Skip to content

Phase 5b: STUDY precompute, measures, and plotting parity #79

Closed

Description

@suraj-ranganath

🤖 Phase issue for the STUDY and standalone integration epic #78.

Goal

Implement STUDY measure precompute and study-measure plotting parity on top of the Phase 5a STUDY/session foundations.

Target branch and PR flow

  • Create the phase branch from feature/study-standalone-completion after Phase 5a lands, unless a temporary early branch is explicitly coordinated.
  • Open the phase PR back into feature/study-standalone-completion.
  • The phase PR should close this issue.

Dependencies

In scope

  • Precompute channel measures.
  • Precompute component measures.
  • Plot channel/component STUDY measures.
  • std_* helpers required by measure precompute and measure plotting workflows.
  • GUI dialogs, help Markdown, history strings, and valid Python console echoes for measure workflows.

Out of scope

  • Basic STUDY creation/load/save/design contracts; see Phase 5a.
  • Preclustering arrays, component clustering, and cluster editing/plotting workflows; see Phase 5c.
  • Final cross-phase integration evidence and broad GUI Agent QA; see Phase 5d.
  • External-only LIMO behavior unless explicitly represented by a clear user-facing message.

Acceptance criteria

  • STUDY precompute and measure plotting workflows are usable from GUI, Python API, and eegprep-console.
  • Outputs and STUDY/ALLEEG mutations match EEGLAB structure expectations where deterministic.
  • Tests cover representative multi-dataset fixtures, channel/component measure paths, missing ICA/channel-location cases, cancel/error paths, history replay, and MATLAB parity where feasible.
  • GUI dialogs and plotting flows have visual parity captures and PR user-attachment side-by-side images.
  • Required lint/type/test commands pass.

/goal prompt

/goal Complete EEGPrep parity for STUDY measure precompute and measure plotting workflows. Build on Phase 5a contracts and #60 plotting primitives, inspect EEGLAB source first, implement GUI/API/eegprep-console paths, add multi-dataset and MATLAB parity tests where deterministic, add visual parity screenshots, run ruff/format/ty and focused plus non-slow pytest, and iterate until review finds no actionable parity or correctness issues.

Activity

  1. added
    phase
    on May 28, 2026
  2. claude commented on May 28, 2026

    @claude
    Contributor

    🤖 Plan:

    Research

    This is a multi-week multi-module port, not a bug. Phase 5b builds STUDY measure precompute, study-measure plotting, and clustering on top of Phase 5a STUDY/session contracts. Phase 5a (#65) is OPEN and unstarted, the prerequisite integration branch feature/study-standalone-completion does not exist on origin, and #60 (plotting primitives Phase 4) is OPEN. EEGPrep's current STUDY surface is a stub with no std_* helpers and only placeholder dispatches for every Phase 5b user-facing entry point.

    Current state

    Hard blockers

    Proposed Approach

    Do not start a PR yet. Once Phase 5a lands and the integration branch exists, decompose Phase 5b into focused sub-PRs that each merge into feature/study-standalone-completion:

    1. Precompute foundations — port std_precomp, std_readdata/std_readfile, measure file I/O (.dat*, .ica*), and pop_precomp for both channels and components variants. Reuse Phase 5a STUDY dict + ALLEEG iteration. Multi-dataset fixture under sample_data/study_demo/ (3-4 synthesized subjects from eeglab_data.set). MATLAB parity on a deterministic measure (ERP mean) on the fixture.
    2. Channel measure plotting — port std_erpplot, std_specplot, std_topoplot, std_chantopo, and pop_chanplot. Gate on Phase 4 plotting primitives from Epic: Complete EEGPrep core EEGLAB parity except browser and external plugins #60; explicitly note the dependency.
    3. Component measure plotting — std_erspplot, std_itcplot, component-projection helpers, and the component side of pop_chanplot/pop_envtopo. Same Phase 4 gate.
    4. Preclustering arrays — std_preclust, std_pca, preclustering measure-vector assembly, pop_preclust. Persist preclust arrays in the STUDY dict matching EEGLAB layout so .study round-trips with Phase 5a's save path.
    5. Clustering + editing — std_kmeans/std_dipoleclust, std_editset, pop_clust, pop_clustedit, cluster-membership plotting hooks.
    6. GUI + console sync — for each new pop_*: return_com=True, replace placeholder in menu_actions, extend tests/test_console_workspace.py for namespace/history sync, capture visual parity screenshots via .agents/skills/eeglab-gui-visual-parity/.
    7. Missing-ICA / missing-channel-locations / cancel/error paths — covered per pop_* rather than as a standalone PR.

    Open questions for the human owner before sub-PR 1 starts

    • Measure file format: EEGLAB-compatible .dat*/.ica* binary sidecars, or EEGPrep-native sidecars + a converter? Former preserves MATLAB cross-tool workflows; latter is cleaner.
    • Cluster parity target: bit-exact with EEGLAB kmeans/pca (requires seeded RNG matching MATLAB) or behavioral parity only?
    • Multi-dataset fixture: synthesize from eeglab_data.set (small, in-repo) or check in a trimmed real STUDY? Affects test stability.
    • Plotting dependency: block sub-PRs 2-3 on Epic: Complete EEGPrep core EEGLAB parity except browser and external plugins #60 merging, or land precompute + clustering (1, 4, 5) first against Phase 5a and circle back for plotting?
    • LIMO-adjacent measure paths: render a "not implemented" message at the pop_precomp GUI for LIMO-only options, or hide them?

    No PR will be opened. Awaiting Phase 5a (#65) landing, feature/study-standalone-completion creation, and decisions on the open questions before starting sub-PR 1.

  3. changed the title [-]Phase 5b: STUDY precompute, measures, plotting, and clustering parity[/-] [+]Phase 5b: STUDY precompute, measures, and plotting parity[/+] on May 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

phase

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions