Repository navigation
Port Neuroscan CNT loader tests - #354
arnodelorme merged 1 commit into
Conversation
|
🤖 Problem The current EEGLAB suite invokes sixteen Neuroscan CNT loading variants through two wrappers, but the tests contain no assertions and EEGPrep previously routed CNT files through ambiguous generic detection. Upstream loader behavior also mishandles several offsets and blocked int32 reads. Approach Implement a standalone specification-level CNT reader for 16/32-bit data, calibrated and raw reads, exact partial ranges, channel-blocked storage, event tables 1–3, and optional .fdt-backed output. Add the pop wrapper and File-IO route, and turn every upstream call into observable assertions. Key code src/eegprep/functions/sigprocfunc/loadcnt.py parses setup/channel/event records and reads exact channel-major ranges. src/eegprep/functions/popfunc/pop_loadcnt.py constructs synchronized EEG fields, events, and history. tests/test_cnt_eeglab_tests.py generates deterministic CNT fixtures and checks all current cases plus boundary behavior. Tests 19 focused tests pass, and integration with BDF plus File-IO passes 76 tests with two expected MATLAB skips. The isolated branch passed a 2,298-test broad run and matched the real upstream int32 fixture exactly; int16 scaling was within one float32 ULP. Ruff, ty, staged pre-commit, and Sphinx pass. |
|
Claude encountered an error after 0s —— View job I'll analyze this and get back to you. |
eac7a7b to
d51f3c1
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.
d51f3c1 to
2fb938b
Compare
2fb938b to
6cda3b5
Compare
Ports both current CNT wrapper methods and all 16 underlying loader calls into deterministic pytest coverage. Adds standalone 16/32-bit Neuroscan CNT loading, calibrated partial and blocked reads, event tables, memory-mapped output, File-IO integration, and fixes several credible upstream offset and block-width defects.