Skip to content

Validate the GDF writer and run the CNT, ERPSS and openbdf/readbdf MATLAB comparisons #391

Open

Description

@arnodelorme

Narrowed 2026-10-16 (develop 3ef5debb, after #484). The original issue is kept below.

Done in #484

tests/test_binary_recording_reference.py compares readers with EEGLAB on the pinned eeglab_tests recordings. It's opt-in (--eeglab-backend=matlab), so default CI doesn't collect it. These pass on MATLAB R2025b with EEGLAB 8ac485f6 and eeglab_tests ff605546:

  • pop_loadbv, BrainVision: 8 headers, including vectorized int16/ieee32 and a channel/range selection
  • readegi / pop_readegi / pop_readsegegi, EGI Simple Binary: TESTEGI.RAW, TEST_001/002.RAW
  • pop_importegimat, EGI Net Station MATLAB export: segmented_matlab.mat
  • pop_biosig on BDF: jo1_3.bdf, blockrange [1 10]

Remaining

  • CNT and ERPSS. test_reference_cnt_original_recordings and test_reference_pop_read_erpss_original_recordings are written, but they skip because the neuroscanio and ERPSS plugins aren't installed in the reference EEGLAB. Install both and run the tests on TEST.CNT, TEST32BIT_WITHEVENT.CNT, ERPSSTESTCOMP.RAW and ERPSSCOMPRESSED.RAW.
  • openbdf / readbdf. test_reference_readbdf_original_bdf_recording skips because openbdf isn't on the MATLAB path. At the pinned commit it exists only as a private function in Fileio and FieldTrip. Either call those copies, or decide that the pop_biosig BDF comparison is enough.
  • GDF writer. writegdf / pop_writeeeg(..., 'TYPE', 'GDF') is checked only by reading the file back with MNE (tests/test_writegdf.py). test_upstream_pop_writeeeg_original_full_recording only checks that MATLAB's writer creates a file. Next step: write sample_data with eegprep, read it with MATLAB Biosig pop_biosig, and compare data, srate, labels and events, in both directions. No external recording is needed.

Original issue

🤖 Filed by an agent at @adelorme's request, as post-merge follow-up for the EEGLAB test-port stack (#329–#372).

The stack added six new binary reader/writer families. None of them is reachable from the parity_repo pipeline (which loads BIDS/.set only), and their tests generate their own fixtures rather than using real recordings.

Worked example — tests/test_cnt_eeglab_tests.py is explicit about this in its own docstring: the upstream EEGLAB recordings are 14 MB and 27 MB Git LFS objects, so the test writes specification-level CNT files with a local _write_cnt helper and asserts that loadcnt.py — added in the same PR — parses them. Reader and writer were written in the same commit, so the test proves they agree about the layout; it cannot detect that both misread the spec.

This is reasonable engineering given the fixture sizes, but it means these readers currently have no oracle. Of the 99 new/changed test files in the stack, 0 reference matlab, octave, eeglabcompat, or pytest.mark.parity.

Validate each against a real recording (and MATLAB/EEGLAB where practical):

Fixtures need not be committed — validating locally against real files and recording the result here is enough.

Activity

  1. added
    P1
    on Sep 19, 2026
  2. changed the title [-]Validate the six new binary reader families against real recordings[/-] [+]Validate the GDF writer and run the CNT, ERPSS and openbdf/readbdf MATLAB comparisons[/+] on Oct 16, 2026
  3. suraj-ranganath commented on Oct 16, 2026

    @suraj-ranganath
    Member

    #484 (merged as 3ef5debb) compares BrainVision, EGI RAW/segmented, EGI MAT and BDF (through pop_biosig) with EEGLAB on the real eeglab_tests recordings, and all of them pass on MATLAB. I narrowed this issue to what's left:

    • CNT and ERPSS: the tests are written but skip until the neuroscanio and ERPSS plugins are installed.
    • openbdf/readbdf: openbdf isn't on the MATLAB path.
    • The GDF writer: there's no MATLAB read-back check yet.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

P1

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions