Skip to content

pop_chanedit (Edit > Channel locations): graphical and numerical parity with EEGLAB #728

Backlog

Description

@arnodelorme

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_chanedit, the Edit menu item "Channel locations", from the Edit menu report of November 26, 2026 (EEGPrep develop df89e80 against EEGLAB develop 16cc13212, jamming under Xvfb).

Findings of the report for this function
  • F1: 'settype' and 'setref' with a channel range as text ('1:10'), the form EEGLAB writes in its history, raise ValueError in EEGPrep. With numbers, 'setref' leaves EEG.ref at common (EEGLAB: Cz). Blocks the user.
  • F4: 'nosedir': EEGLAB rotates the coordinates and stores +X, EEGPrep stores +Y and does not rotate. Decision needed.
  • F12: Values shown: sph_radius 1 where the file has none, urchan index 0 where the file stores 1, -0, five digits. Extra edit box for Reference.
  • F15: Edit boxes and checkboxes do not line up vertically (rule 9 of the GUI rules).
  • F17: Three buttons lose their & (Qt shortcut mark) and their capital letter.
  • F18: A ticked checkbox is drawn as a tick with no box. To check on the Mac.
  • F24: History: no eeg_store line after an edit in place, pop_newset shown or not, and EEGLAB writes invalid lines on Ok with nothing typed.

F15, F16, F18, F21 and F24 are shared by several windows: fix them here only for this function's window, under the GUI rules of project_eegprep (rules/gui-parity.md).

Files

Activity

  1. added
    later
    gui-parity
    on Nov 27, 2026
  2. claude commented on Nov 27, 2026

    @claude
    Contributor

    🤖 Plan:

    • Read issue, AGENTS.md, fix-issue and pull-request skills
    • Duplicate-work preflight: no open PR for pop_chanedit or pop_chanedit (Edit > Channel locations): graphical and numerical parity with EEGLAB #728
    • Research and proposed approach (below)
    • Implementation: not started. The issue is labeled later, and its next step waits for Arno's review of the Edit menu Word file. F4 and F24 need decisions first. The 7 GUI findings plus 3 numerical differences go past the scope of one small fix (<100 lines).

    Research

    F1 is the only finding that blocks users and is clearly a bug. _index_value_args passes the range straight to _indices, which calls float('1:10') and raises ValueError. EEGLAB runs str2num on a string range first. With numeric indices, setref writes only chanlocs[i]['ref']. Nothing copies a shared per-channel ref into EEG.ref, so EEG.ref stays common. In EEGLAB, eeg_checkset sets EEG.ref when all channels share one ref. I couldn't confirm that line because src/eegprep/eeglab/ isn't in this checkout. F4 (nosedir) only stores the string and never rotates X/Y. Both nosedir and plotrad are stored with chaninfo[key] = value.

    Relevant code

    Proposed Fix

    I suggest splitting the work into separate PRs once the later label is removed:

    1. F1 (small, ready to go): in _index_value_args, parse a string index with the MATLAB range syntax ('1:10', '1 3 5') before _indices. After setref, set EEG['ref'] to the shared ref value when every data channel has the same one, matching EEGLAB. Write the regression test for N37, N42 and N43 first, in tests/test_pop_chanedit.py.
    2. F4 / N40 (decision needed): either match EEGLAB (rotate the Cartesian coordinates, store +X, keep the original in chaninfo) or keep EEGPrep's current behavior and document it. I'd match EEGLAB.
    3. N39 topo2all: first compare EEGPrep's convertlocs with EEGLAB's topo2sph/sph2cart sph_radius default. F12 (sph_radius 1 where the file has none) suggests the same cause, so fix them together.
    4. GUI (F12, F15, F17, F18): a visual-parity PR scoped to this window, using the eeglab-gui-visual-parity skill and the project_eegprep GUI rules.
    5. F24 history: wait for Arno to decide how eeg_store/pop_newset history lines should look.

    Open questions for Arno: F4 direction (rotate like EEGLAB?), the F24 history format, and whether the extra Reference edit box (F12) should go.

  3. suraj-ranganath commented on Nov 28, 2026

    @suraj-ranganath
    Member

    Two findings on develop (aa81d9ab) with the continuous tutorial dataset:

    • In Edit > Channel locations, type 5 in Channel number and press Return. The editor closes. Return should select channel 5 and display its label, just as the navigation arrows do.
    • Reopen the editor and click Plot 2-D. Qt creates the map with 34 text items, then hides its window when assigning the editor as its parent. Set the parent before showing the map, or show it again afterward.

    Verify the labeled map is visible while the editor is open. Close the map, continue editing and check both Ok and Cancel. This stays with the parked Edit work in #711. pop_chanedit.m L383 · pop_chanedit.m L404 · plot_utils.py L36

  4. arnodelorme commented on Dec 1, 2026

    @arnodelorme
    CollaboratorAuthor

    🤖 The current Linux GUI comparison is in #947, with the implementation and native before/after evidence in PR #944.

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

    gui-paritylater

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions