Repository navigation
Closed
Labels
phaseEpic implementation phase
Description
🤖
Phase 6: STUDY And Group-Level Depth
Summary
Deepen EEGPrep STUDY and group-level workflow parity using the statistics and time-frequency helpers from earlier phases. This phase should improve real multi-dataset research workflows without pretending external-only LIMO behavior is available.
Starts after Phases 1, 3, and 4. Can overlap with Phase 5 if interfaces are stable.
Scope
Prioritize:
- design and variable helpers used by real STUDY workflows
- measure readers/writers for ERP/ERSP/ITC/spec/topo/PAC where backed by EEGPrep data
- plotting helpers that consume Phase 3 and Phase 4 outputs
- deterministic clustering helpers
- file consistency checks and dataset/session synchronization
LIMO and external-toolbox paths must be real standalone EEGPrep behavior or clear user-facing limitations. Do not silently fake them.
Acceptance Criteria
STUDY,CURRENTSTUDY,ALLEEG, andCURRENTSETstay synchronized in GUI and console.- Multi-dataset sample fixtures exercise design, precompute/read/write, plotting, and clustering basics.
- MATLAB parity covers deterministic STUDY structures, design metadata, and measures where feasible.
- GUI flows include visual parity and GUI Agent mixed-flow QA.
- Documentation and help resources explain supported STUDY behavior and limitations.
- Matrix rows touched by this phase are updated.
Verification
Run focused STUDY tests, multi-dataset sample workflows, MATLAB parity where deterministic, GUI visual parity for dialogs, GUI Agent mixed GUI/console QA, then:
uv run --no-sync ruff check .uv run --no-sync ruff format --check .uv run --no-sync ty check- broader tests as risk requires
/goal Prompt
/goal Complete the useful remaining STUDY/group-level EEGLAB parity depth. Build standalone design, measure, plotting, clustering, consistency, and session synchronization workflows using Phase 3/4 helpers, with MATLAB parity, multi-dataset sample fixtures, GUI visual parity, console tests, clear handling of external-only LIMO behavior, and parity matrix updates.
Metadata
Metadata
Assignees
Labels
phaseEpic implementation phase
Activity
claude commentedon Jun 5, 2026
🤖 Plan:
studyfunccoverage vs EEGLABScope check
This is a phase-epic scope item (multi-module, >100 LOC, design work) per
.agents/skills/fix-issue/SKILL.md. No PR will be opened. Posting research + proposed approach for human review.Also: prerequisite phases #132 (Phase 1), #134 (Phase 3), #135 (Phase 4) are all still OPEN, and the epic branch
feature/eeglab-core-parity-completionhas no Phase 1/3/4 merges yet (git logshows only extension-completion and session-history work). Per #131 the recommended order is1 -> 2+3+4 -> 5+6 -> 7 -> 8. Phase 6 cannot land usefully until Phases 1, 3, 4 expose their stable APIs.Research
EEGPrep already ships 32
studyfuncmodules covering core design, precompute/read, clustering, and basic plotting; EEGLAB has ~133. The audit (.notes/eeglab-migration-gap-audit.md#L146-L164) classifies the remaining surface into five buckets: LIMO/stats, design/variable helpers, measure readers, plotting, clustering details, and consistency/file checks. STUDY/CURRENTSTUDY are already wired into the sharedEEGPrepSessionnamespace and console workspace.Relevant code
src/eegprep/functions/studyfunc/— 32 ported modules incl.std_makedesign,std_precomp,std_readdata,pop_clust,pop_clustedit,std_*plotsrc/eegprep/functions/adminfunc/console.py#L26—WORKSPACE_NAMESalready includesSTUDY/CURRENTSTUDYsrc/eegprep/functions/adminfunc/console.py#L332-L388— bidirectional STUDY sync between session and namespacetests/test_study_metadata.py,tests/test_study_measures.py,tests/test_study_clustering.py,tests/test_study_end_to_end.py,tests/test_gui_pop_study.py— 58 existing STUDY tests total.notes/eeglab-migration-gap-audit.md#L146-L164— explicit Phase 6 target list;#L517-L544— fullstudyfuncgap inventoryGaps with no current port:
std_readerp/ersp/itc/spec/topo/pac,std_savedat,pop_addindepvar,pop_importgroupvar,pop_listfactors,std_builddesignmat,std_rebuilddesign,std_findgroupvars,std_saveindvar,std_plot/plotcurve/plottf/topoplot/chantopo/propplot,std_apcluster,std_centroid,std_dipoleclusters,std_findoutlierclust,optimal_kmeans,robust_kmeans,std_checkfiles,std_checkdatasession,std_uniformfiles,std_uniformsetinds, plus the LIMO surface (pop_limo,pop_limoresults,std_limo*,std_readfilelimo).No multi-dataset STUDY fixture exists under
sample_data/(only single-subjecteeglab_data*.set).Proposed Approach
Split Phase 6 across 4–5 sub-PRs against
feature/eeglab-core-parity-completion, sequenced after Phases 1/3/4 land. Each sub-PR is independently mergeable, ~300–800 LOC, with its own help markdown, tests, and visual-parity artifacts where GUI-touching.6a — Multi-dataset STUDY fixture + design/variable helpers. Add a small 2–3 subject synthetic STUDY (in
tests/fixtures.pyorsample_data/). Portpop_addindepvar,pop_importgroupvar,pop_listfactors,std_builddesignmat,std_rebuilddesign,std_findgroupvars,std_saveindvar,std_addvarlevel. Extendstests/test_study_metadata.pywith MATLAB parity for deterministic design metadata.6b — Measure readers/writers. Port
std_readerp,std_readersp,std_readitc,std_readspec,std_readtopo,std_readpac,std_savedat. Consumes Phase 3 (statistics) and Phase 4 (timefreq) outputs — this is the hard dependency on prerequisite phases. Extendstests/test_study_measures.py.6c — STUDY plotting helpers. Port
std_plot,std_plotcurve,std_plottf,std_topoplot,std_chantopo,std_erpimageplot,std_propplot. Each adds a visual-parity case undertools/visual_parity/per.agents/skills/eeglab-gui-visual-parity/SKILL.md.6d — Clustering + consistency checks. Port
std_apcluster,std_centroid,std_dipoleclusters,std_findoutlierclust,optimal_kmeans,robust_kmeans,std_checkfiles,std_checkdatasession,std_uniformfiles,std_uniformsetinds. Extendstests/test_study_clustering.pywith deterministic seeds.6e — LIMO classification + GUI/console mixed-flow QA. Per Phase 6: STUDY and group-level depth #137 "do not silently fake LIMO": classify the LIMO surface (
pop_limo,pop_limoresults,std_limo*,std_readfilelimo) as either real standalone ports or explicit user-facing not-supported messages with help markdown undersrc/eegprep/resources/help/. Rungui-agent-flow-qaover the full GUI+console STUDY workflow. Update.notes/eeglab-migration-gap-audit.mdmatrix rows touched by Phase 6.Questions for the issue author
tests/fixtures.py(smaller repo footprint) or a checked-insample_data/study_3subj/(closer to EEGLAB tutorial parity)?Will pause for human/issue-author direction before opening any sub-PR.
suraj-ranganath commentedon Jun 7, 2026
🤖 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.