Skip to content

pop_loadbv (File > Import data > From Brain Vis. Rec. .vhdr file): graphical and numerical parity with EEGLAB #792

Backlog

Description

@suraj-ranganath

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.

Findings of the report for this function

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.

Files

Activity

  1. added
    function-parity
    on Nov 28, 2026
  2. claude commented on Nov 28, 2026

    @claude
    Contributor

    🤖 Plan:

    • Research
    • Test: a saved .set stores an omitted visibility as an empty char and keeps the explicit 1 (tests/test_pop_loadbv.py)
    • Fix: always set event["visible"] (empty string when omitted)
    • Document setname = header filename stem in pop_loadbv.md and data_loading_and_saving.rst
    • PR [IO] Always create visible on pop_loadbv events #802
    • CI
    • 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.

  3. arnodelorme commented on Dec 1, 2026

    @arnodelorme
    Collaborator

    🤖 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    function-parity

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions