You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
🤖 Follow-up from Phase 7 (#138) of epic #131.\n\nRows covered: pac, pac_cont, and STUDY PAC plotting/cache rows where applicable.\n\nScope: implement or explicitly classify standalone PAC and continuous PAC helpers, including cache/precompute behavior, numerical parity tests, and user-facing docs if exposed.\n\nNon-goal: do not add untested analysis math just to satisfy same-name coverage.
Duplicate-work preflight (no open PR or overlapping issue for PAC)
Locate PAC rows in the Phase 1 parity matrix and check current EEGPrep coverage
Post analysis (scope is multi-module / >100 LOC; PR deferred for human review)
Research
Five matrix rows are in scope, all status: port in docs/parity/eeglab_core_parity_matrix.json on origin/phase/1-parity-matrix-contracts (Phase 1 matrix is not yet on develop):
Phase 4 (PR #143, MERGED) and Phase 6 (PR #144, MERGED) both shipped without these rows; the Phase 4 handoff comment on #138 enumerated only timewarp and rsfit as Phase 7 carryover, so PAC slipped through both phases. EEGPrep has zero PAC code today: src/eegprep/functions/timefreqfunc/ contains only newtimef.py and newcrossf.py, and std_precomp only knows the erp/spec/ersp/itc measure keys — no pac branch. The vendored src/eegprep/eeglab/ reference tree is empty in this checkout, so MATLAB source for pac.m/pac_cont.m cannot be inspected locally to bound the port.
Phase 4 PR #143 body — Phase 4 handoff enumerated only timewarp + rsfit as Phase 7 carryover; PAC was not flagged
Phase 1 matrix rows: lines 7317, 7332, 7611, 8211, 8225 of eeglab_core_parity_matrix.json on origin/phase/1-parity-matrix-contracts
Proposed Approach
Not a small bug fix — five new modules, a measure-key extension in std_precomp, three STUDY-cache fields (pacdata/pactimes/pacfreqs), GUI/help wiring on the precompute dialog, numerical parity tests, and Markdown help. Easily >500 LOC if fully ported, requires a spec per .agents/skills/pull-request/SKILL.md, and the issue body explicitly allows the lighter "explicitly classify" path.
The classification path is the right default given EEGLAB's actual surface:
pac.m and pac_cont.m — recommend stale_skip with explicit rationale. In current EEGLAB these are research/demo helpers that are not menu-reachable, not exposed as a documented user API on eeglab.org, and not called from any in-scope EEGPrep workflow. The non-goal in this issue ("do not add untested analysis math just to satisfy same-name coverage") matches the stale-skip policy in the matrix exactly. Cross-frequency coupling that users actually need is already covered by newtimef/newcrossf. Update the matrix rows with this rationale and ship a one-line ADR-style note.
std_pac.m / std_pacplot.m / std_readpac.m — recommend a thin "unsupported measure" classification rather than a full port. These are reachable from pop_precomp and pop_chanplot/pop_clustedit in EEGLAB, so pure stale_skip is wrong. The minimum honest behavior: add \"pac\" to std_precomp.MEASURE_NAMES so the option is accepted, raise a clear NotImplementedError(\"STUDY-level PAC precompute is not implemented in EEGPrep; see issue #148.\") when selected, and surface the same message in pop_chanplot / pop_clustedit if PAC is asked for. Cache fields stay unspecified until a real backend lands. This keeps EEGLAB users from getting silent KeyError surprises while not adding untested coupling math.
If the maintainers instead want a real port, the PR must be split: (a) backend pac.py/pac_cont.py with MATLAB-parity tests against a checked-out EEGLAB tree (currently absent from this clone), (b) std_pac/std_readpac + std_precomp cache wiring with multi-dataset fixtures, (c) std_pacplot + GUI/help. Each sub-PR under 500 LOC, each with its own spec, parity oracle, and visual evidence. This is multi-week scope, not an agent-sized fix.
Stopping here rather than guessing which path the maintainers want. Recommended next step: confirm classify-vs-port, then file a follow-up issue per sub-PR if (3) is chosen. I will open a PR for path (1)+(2) (matrix updates + std_precomp unsupported-measure stub + tests) on request — that piece is small enough to be a single bounded change.
🤖 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.
Activity
claude commentedon Jun 6, 2026
🤖 Plan:
Research
Five matrix rows are in scope, all
status: portindocs/parity/eeglab_core_parity_matrix.jsononorigin/phase/1-parity-matrix-contracts(Phase 1 matrix is not yet ondevelop):functions/timefreqfunc/pac.m→ category 6,responsible_phase: phase_4functions/timefreqfunc/pac_cont.m→ category 6,responsible_phase: phase_4functions/studyfunc/std_pac.m→ category 4,responsible_phase: phase_6functions/studyfunc/std_pacplot.m→ category 4,responsible_phase: phase_6functions/studyfunc/std_readpac.m→ category 4,responsible_phase: phase_6Phase 4 (PR #143, MERGED) and Phase 6 (PR #144, MERGED) both shipped without these rows; the Phase 4 handoff comment on #138 enumerated only timewarp and
rsfitas Phase 7 carryover, so PAC slipped through both phases. EEGPrep has zero PAC code today:src/eegprep/functions/timefreqfunc/contains onlynewtimef.pyandnewcrossf.py, andstd_precomponly knows theerp/spec/ersp/itcmeasure keys — nopacbranch. The vendoredsrc/eegprep/eeglab/reference tree is empty in this checkout, so MATLAB source forpac.m/pac_cont.mcannot be inspected locally to bound the port.Relevant code
src/eegprep/functions/timefreqfunc/— onlynewtimef.py,newcrossf.py; nopac.py/pac_cont.pysrc/eegprep/functions/studyfunc/std_precomp.py#L26—MEASURE_NAMES = (\"erp\", \"spec\", \"ersp\", \"itc\"); nopackeysrc/eegprep/functions/studyfunc/— nostd_pac.py,std_pacplot.py, orstd_readpac.pyrsfitas Phase 7 carryover; PAC was not flaggedeeglab_core_parity_matrix.jsononorigin/phase/1-parity-matrix-contractsProposed Approach
Not a small bug fix — five new modules, a measure-key extension in
std_precomp, three STUDY-cache fields (pacdata/pactimes/pacfreqs), GUI/help wiring on the precompute dialog, numerical parity tests, and Markdown help. Easily >500 LOC if fully ported, requires a spec per.agents/skills/pull-request/SKILL.md, and the issue body explicitly allows the lighter "explicitly classify" path.The classification path is the right default given EEGLAB's actual surface:
pac.mandpac_cont.m— recommendstale_skipwith explicit rationale. In current EEGLAB these are research/demo helpers that are not menu-reachable, not exposed as a documented user API on eeglab.org, and not called from any in-scope EEGPrep workflow. The non-goal in this issue ("do not add untested analysis math just to satisfy same-name coverage") matches the stale-skip policy in the matrix exactly. Cross-frequency coupling that users actually need is already covered bynewtimef/newcrossf. Update the matrix rows with this rationale and ship a one-line ADR-style note.std_pac.m/std_pacplot.m/std_readpac.m— recommend a thin "unsupported measure" classification rather than a full port. These are reachable frompop_precompandpop_chanplot/pop_clusteditin EEGLAB, so purestale_skipis wrong. The minimum honest behavior: add\"pac\"tostd_precomp.MEASURE_NAMESso the option is accepted, raise a clearNotImplementedError(\"STUDY-level PAC precompute is not implemented in EEGPrep; see issue #148.\")when selected, and surface the same message inpop_chanplot/pop_clusteditif PAC is asked for. Cache fields stay unspecified until a real backend lands. This keeps EEGLAB users from getting silent KeyError surprises while not adding untested coupling math.If the maintainers instead want a real port, the PR must be split: (a) backend
pac.py/pac_cont.pywith MATLAB-parity tests against a checked-out EEGLAB tree (currently absent from this clone), (b)std_pac/std_readpac+std_precompcache wiring with multi-dataset fixtures, (c)std_pacplot+ GUI/help. Each sub-PR under 500 LOC, each with its own spec, parity oracle, and visual evidence. This is multi-week scope, not an agent-sized fix.Stopping here rather than guessing which path the maintainers want. Recommended next step: confirm classify-vs-port, then file a follow-up issue per sub-PR if (3) is chosen. I will open a PR for path (1)+(2) (matrix updates +
std_precompunsupported-measure stub + tests) on request — that piece is small enough to be a single bounded change.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.