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
{{ message }}
Repository navigation
pop_importbids (File > Import data > From BIDS folder structure): graphical and numerical parity with EEGLAB #742
EEGPrep checks each EEGLAB function on its own, in one issue, for both the window and the numbers (Arno, November 26, 2026). This issue is pop_importbids, File menu: Import data > From BIDS folder structure, BIDS tools > Import BIDS folder to STUDY. It stays open until the window and the numbers are both acceptably close to EEGLAB's, even when a pull request is merged or closed.
Window: close to EEGLAB. Same layout as EEGLAB's window (720, merged). The import code is EEGPrep's own (rule 2). BIDS export is ignored for now (rule 4).
Numbers: not tested yet. The File menu test did not compare an imported BIDS dataset.
What remains: One numerical comparison of an imported dataset. A look on the Mac.
Add a numerical comparison of a dataset imported through EEGPrep pop_importbids, then run it with the MATLAB backend (proposal below)
No PR from me. This is a tracking issue. What remains is a human merge plus a comparison that needs MATLAB and the eeglab_tests checkout, and neither is available to this agent.
Research
A MATLAB comparison already exists, but it calls pop_load_frombids on one .set file. It does not call EEGPrep's pop_importbids on the BIDS folder. So the folder path is not compared: the subject query, bids_list_eeg_files, the derivative save, and std_checkset. The MATLAB side also runs with bidschanloc off, and the Python side infers locations, so channel locations are never compared.
In test_load_frombids_matches_matlab_pop_importbids, replace the Python side with pop_importbids(bids_root, subjects=[subject], outputdir=tmp_path/"py"/subject, bidsevent="on", bidschanloc="off", eventtype="value"). Pick the _run-1_ dataset from the returned ALLEEG, the same way the MATLAB helper does. Keep the existing checks: data is exact, and event type, latency and duration stay within EVENT_ATOL.
Save {EEG.chanlocs.labels} in _matlab_import_run1 and assert that the channel labels match. Comparing coordinates needs bidschanloc on on both sides, so that should be a separate decision.
Run it once with the real MATLAB backend (eeglab-reference.yml, or uv run --no-sync pytest tests/test_ds003061_stage_parity.py --eeglab-backend=matlab ...) and post the counts here. That run is the "numbers" evidence this issue asks for.
Open question: should the comparison include channel coordinates (bidschanloc on), or only data, events and labels?
🤖 The new pop_importbids layout finding is tracked in #992. PR #991 includes the actual MATLAB and Qt captures and the same-input numerical comparison.
Activity
claude commentedon Nov 27, 2026
🤖 Plan:
pop_importbids, then run it with the MATLAB backend (proposal below)No PR from me. This is a tracking issue. What remains is a human merge plus a comparison that needs MATLAB and the
eeglab_testscheckout, and neither is available to this agent.Research
A MATLAB comparison already exists, but it calls
pop_load_frombidson one.setfile. It does not call EEGPrep'spop_importbidson the BIDS folder. So the folder path is not compared: the subject query,bids_list_eeg_files, the derivative save, andstd_checkset. The MATLAB side also runs withbidschanloc off, and the Python side infers locations, so channel locations are never compared.Relevant code
tests/test_ds003061_stage_parity.py#L868-L908: MATLABpop_importbidsimport of ds003061, saves run-1 arraystests/test_ds003061_stage_parity.py#L912-L957: compares MATLABpop_importbidswith Pythonpop_load_frombids, notpop_importbidssrc/eegprep/plugins/EEG_BIDS/pop_importbids.py#L38-L117: folder import (list files, load each one, save derivatives, STUDY)Proposed Fix
test_load_frombids_matches_matlab_pop_importbids, replace the Python side withpop_importbids(bids_root, subjects=[subject], outputdir=tmp_path/"py"/subject, bidsevent="on", bidschanloc="off", eventtype="value"). Pick the_run-1_dataset from the returnedALLEEG, the same way the MATLAB helper does. Keep the existing checks: data is exact, and event type, latency and duration stay withinEVENT_ATOL.{EEG.chanlocs.labels}in_matlab_import_run1and assert that the channel labels match. Comparing coordinates needsbidschanloc onon both sides, so that should be a separate decision.eeglab-reference.yml, oruv run --no-sync pytest tests/test_ds003061_stage_parity.py --eeglab-backend=matlab ...) and post the counts here. That run is the "numbers" evidence this issue asks for.Open question: should the comparison include channel coordinates (
bidschanloc on), or only data, events and labels?Read selectable BIDS event fields from visible TSV headers
pop_importbids: read event fields from visible TSV headers (#780)
arnodelorme commentedon Dec 1, 2026
🤖 The new pop_importbids layout finding is tracked in #992. PR #991 includes the actual MATLAB and Qt captures and the same-input numerical comparison.