Skip to content

Follow-up: STUDY plotting, precompute, and selection long-tail helpers #149

Closed

Description

@suraj-ranganath

🤖 Follow-up from Phase 7 (#138) of epic #131.\n\nRows covered: remaining Phase 6 STUDY rows still outside the implemented design, clustering, cache-reader, and plotting surfaces after Phases 6-7.\n\nScope: either implement needed STUDY plotting/precompute/selection helpers with multi-dataset tests and GUI evidence where user-facing, or classify each as consolidated, external-dependency, MATLAB-runtime, or stale with row-level rationale.\n\nNon-goal: do not one-for-one port EEGLAB STUDY GUI internals without an EEGPrep workflow need.

Activity

  1. claude commented on Jun 6, 2026

    @claude
    Contributor

    🤖 Plan:

    Issue is too large for a single PR (~78 unresolved rows across plotting, cache, design, clustering, and parameter dialogs); posting design comment instead.

    Research

    After PR #144 (Phase 6 STUDY depth), the parity matrix 4_study_group_depth category still has 74 rows at port and 4 at partial against 48 implemented and 7 external_dependency_skip. PR #144 introduced unified helpers (std_readdata, _std_measureplot, _cluster_utils) that consolidate many EEGLAB per-measure entry points, but the matrix rows for those entry points were never reclassified — so the gap looks larger than it is. Root cause: Phase 6 closed the workflow surface (design, measure precompute, clustering basics, LIMO limitation stubs) but skipped row-level disposition for measure-specific readers, plotting wrappers, parameter dialogs, and helper utilities.

    Relevant code

    Proposed Fix

    Treat this as triage-first, not implement-first. Most of the 78 rows already have an EEGPrep equivalent; the matrix just needs disposition. Split into four PRs sized to merge cleanly into feature/eeglab-core-parity-completion.

    PR-1: row-level triage (no runtime code; matrix + docs only, ~150 LOC of JSON edits)

    For each unresolved row, set status from one of:

    • consolidated — already covered by EEGPrep helper, with eegprep_equivalent pointer. Candidates: std_readerp/std_readspec/std_readersp/std_readitc/std_readtopo → std_readdata; std_plot/std_plotcurve/std_plottf → _std_measureplot; std_chaninds/std_changroup → _cluster_utils; std_erp/std_ersp/std_spec/std_topo → std_precomp; std_loadalleeg → pop_loadstudy; std_serialize → pop_savestudy; std_filecheck/std_fileinfo → std_checkfiles; std_getdataset/std_selectdataset → pop_study/_study_utils.
    • external_dependency_skip — needs Fieldtrip/LIMO/dipfit: std_dipplot, std_dipoleclusters, std_pac, std_pacplot, std_movie, std_interp (Fieldtrip neighbours), neural_net. Match the existing LIMO row pattern.
    • matlab_runtime_skip — MATLAB GUI/figure shims with no standalone need: std_figtitle, std_detachplots, std_reset, eeglabciplot, gethashcode, toporeplot, std_propplot, std_erpimageplot (delegates to std_erpimage which is already MATLAB-only viewer surface unless we explicitly port).
    • port — keep ONLY for rows that are user-facing, missing, and feasible standalone. Short list (see PR-2/3/4 below).

    Acceptance: every row has non-empty eegprep_equivalent or rationale plus updated test_notes. Run the matrix validator (whichever Phase 1 script enforces taxonomy in tests/test_parity_matrix*.py) and ./pre-commit.py --fix.

    PR-2: user-facing STUDY parameter dialogs (~600 LOC + tests)

    Implement the pop_*params family that gate plot defaults from menus: pop_erpparams, pop_specparams, pop_erspparams, pop_statparams, pop_erpimparams, pop_dipparams. Each is a small dialog over STUDY.etc.<measure>params with return_com=True, history, and inputgui parity vs. EEGLAB screenshots. Add pop_<name>.md help files and visual parity cases under tools/visual_parity. Also close pop_clust, pop_study, pop_studydesign partial → implemented if they are partial only because parameter dialogs are missing.

    PR-3: STUDY consistency + selection helpers (~400 LOC + tests)

    Port the small subset that real workflows need but no current helper covers: std_checkconsist, std_checkdesign, std_indvarmatch, std_getindvar, std_gettrialsind, std_maketrialinfo, std_combtrialinfo, std_findsameica, std_selsubject, std_substudy, std_rmdat, std_rmalldatafields. These are pure-Python data-structure helpers used by std_makedesign/pop_studydesign and parity tests; no GUI. One test file tests/test_study_consistency.py with multi-dataset sample_data fixtures.

    PR-4: measure-specific readers split if telemetry warrants (~300 LOC; only if a workflow proves a per-measure entry is needed)

    Default plan: keep std_readdata as the single API and mark std_readerp etc. consolidated in PR-1. If a Phase 7 reviewer or downstream consumer needs the per-measure call signature for EEGLAB code-paste parity, add thin wrappers that forward datatype="erp"/etc. and return EEGLAB-shaped tuples. Do not write this PR speculatively; it is contingent on PR-1 review feedback.

    Non-goals (explicit deferrals)

    • LIMO statistics: already stubbed in PR [STUDY] Add group-level depth helpers #144 with _limo_limitations; do not expand here.
    • std_movie, std_dipplot, std_dipoleclusters: defer until a dipfit/Fieldtrip Python stack lands; classify external_dependency_skip for now.
    • EEGBrowser-style scrolling viewers (std_erpimage-as-figure): cover under the EEGBrowser menu_placeholders exclusion already in repo.

    Open questions for reviewer

    1. Is consolidated the right matrix status for measure-specific readers/plotters that route through a unified helper, or should we keep port with a follow-up issue per row?
    2. Should pop_*params dialogs persist into STUDY.etc.*params only, or should they also patch _default_target in _std_measureplot so console-only users see the saved defaults?
    3. Do we need MATLAB parity tests for std_checkconsist/std_checkdesign (they are deterministic struct walks) or are Python-only multi-dataset tests sufficient?
    4. Confirm target branch: feature/eeglab-core-parity-completion (matches the rest of the epic) rather than develop.

    Awaiting human sign-off before opening any PR.

  2. suraj-ranganath commented on Jun 7, 2026

    @suraj-ranganath
    MemberAuthor

    🤖 Resolved by the work now included in PR #152. Closing this constituent phase/follow-up issue now; parent epic #131 remains open until the epic PR merges.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions