Implement STUDY PAC and LIMO design workflows - #170
Conversation
|
Claude finished @suraj-ranganath's task in 4m 45s —— View job Code review
I reviewed the full diff against BlockingNone. ImportantNone. Nits
Test gaps
EEGLAB parity notes
The STUDY cache → |
|
🤖 Spec for the >500 LOC Phase 4 diff. Problem: Phase #161 left advanced STUDY PAC/statistics/LIMO workflows classified as optional or missing in docs/parity/eeglab_final_parity_matrix.json:819, docs/parity/eeglab_final_parity_matrix.json:859, and docs/parity/eeglab_final_parity_matrix.json:891. EEGPrep had no real standalone std_pac/std_readpac/std_pacplot path, no practical pac/pac_cont implementation, and LIMO-compatible design generation was only an external-toolbox boundary. Approach: Add real PAC computation in src/eegprep/functions/timefreqfunc/_pac_support.py:60 and src/eegprep/functions/timefreqfunc/_pac_support.py:164, wire public pac/pac_cont wrappers, build STUDY cache/read/plot workflows in src/eegprep/functions/studyfunc/std_pac.py:24, src/eegprep/functions/studyfunc/std_readdata.py:116, and src/eegprep/functions/studyfunc/std_pacplot.py:15, add LIMO design matrix export in src/eegprep/functions/studyfunc/std_limodesign.py:16, and add standalone neighbor/interpolation plus explicit source-backend boundaries in src/eegprep/functions/studyfunc/std_prepare_neighbors.py:17 and src/eegprep/functions/studyfunc/std_interp.py:18. Key code: result = compute_pac(
phase_data,
amplitude_data,
srate,
freqphase=freqphase,
freqamp=freqamp,
method=method,
timesout=timesout,
)
group["pacdata"] = np.abs(result.pac)
group["pactimes"] = result.times
group["pacfreqs"] = result.ampfreqsThis is the core STUDY cache contract: downstream std_readpac/std_pacplot read EEGPrep-owned real PAC magnitude arrays rather than emulating external files. Tests: Focused PAC and STUDY coverage is in tests/test_pac_time_frequency_helpers.py:76 and tests/test_study_measures.py:265. The parity row updates are covered by tests/test_eeglab_final_parity_matrix.py and tests/test_eeglab_parity_matrix.py, and GUI/help evidence remains covered by tests/test_visual_parity.py. |
…ompletion' into phase/161-study-pac-limo # Conflicts: # .notes/implementation-notes.html
Add standalone PAC computation and STUDY PAC cache/read/plot workflows, plus LIMO-compatible design-matrix export and explicit source/PAC limitation boundaries. Update Phase 4 parity rows, docs, help resources, and regression coverage for advanced STUDY workflows.
Closes #161