You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
pop_loadbv (File > Import data > From Brain Vis. Rec. .vhdr file): graphical and numerical parity with EEGLAB #792
EEGPrep checks each EEGLAB function on its own, in one issue, for both the window and the numbers (Arno, November 26, 2026). This issue is pop_loadbv, File menu: Import data > From Brain Vis. Rec. .vhdr file. It stays open until the window and the numbers are both acceptably close to EEGLAB's, even when a pull request is merged or closed.
Window: EEGPrep names the dataset testbva after its header. EEGLAB left the name empty on this file.
Numbers: Samples and all 17 marker types and latencies matched. With the seventh marker field omitted, EEGPrep omits visible and EEGLAB creates an empty field. EEGPrep reads an explicit value correctly.
What remains: Document the filename-stem convention. Decide how to represent omitted visibility for MATLAB consumers and preserve explicitly supplied values.
Repro on develop (aa81d9ab): Import testbva.vhdr and inspect the name, event and urevent fields. As a control, import a marker ending in ,,1 and inspect its visible value.
Done when: Save and reload both cases. Check the agreed representation of missing visibility, the explicit value, the dataset name, all 17 original markers and the signal.
EEGLAB reference workflow: needs a maintainer (workflow_dispatch returned 403 for the agent token)
Research
parsebvmrk.m#L36-L39 always assigns EVENT(idx).visible = char(visible). That is '' when the 7th field is missing. pop_loadbv.py#L606-L607 only added the key when the value was non-empty. A saved .set then stored an empty double ([]) for mixed files, or no field at all when no marker had a value. EEGLAB's pop_loadbv.m never sets setname; EEGPrep sets it to the header stem (pop_loadbv.py#L694).
Proposed Fix
Always write visible, as an empty string when the field is omitted (saved as an empty MATLAB char, like EEGLAB), and keep explicit values. Keep the stem-based setname and document it.
Not addressed: parsebvmrk.m also always creates bvtime (parsed with %d); EEGPrep keeps it as a string and omits it when empty. Not raised in this issue.
Activity
claude commentedon Nov 28, 2026
🤖 Plan:
.setstores an omitted visibility as an empty char and keeps the explicit1(tests/test_pop_loadbv.py)event["visible"](empty string when omitted)pop_loadbv.mdanddata_loading_and_saving.rstworkflow_dispatchreturned 403 for the agent token)Research
parsebvmrk.m#L36-L39always assignsEVENT(idx).visible = char(visible). That is''when the 7th field is missing.pop_loadbv.py#L606-L607only added the key when the value was non-empty. A saved.setthen stored an empty double ([]) for mixed files, or no field at all when no marker had a value. EEGLAB'spop_loadbv.mnever setssetname; EEGPrep sets it to the header stem (pop_loadbv.py#L694).Proposed Fix
Always write
visible, as an empty string when the field is omitted (saved as an empty MATLAB char, like EEGLAB), and keep explicit values. Keep the stem-basedsetnameand document it.Not addressed:
parsebvmrk.malso always createsbvtime(parsed with%d); EEGPrep keeps it as a string and omits it when empty. Not raised in this issue.arnodelorme commentedon Dec 1, 2026
🤖 The new pop_loadbv layout finding is tracked in #964. PR #963 includes the actual MATLAB and Qt captures and the same-input numerical comparison.