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_loadset of MATLAB v7.3 .set files returns 1-character labels and event types, and crashes on empty events #497
EEGLAB writes v7.3 (HDF5) .set files when asked, and falls back to v7.3 automatically for files too large for v6 (pop_saveset.m:262-268 at the 8ac485f6 pin). EEGPrep's v7.3 reader decodes them incorrectly.
The committed sample_data/eeglab_data_hdf5.set loads with channel labels [uint16(70), uint16(69), …] instead of ['FPz', 'EOG1', …], and event type 115 instead of 'square'.
Every MATLAB-written v7.3 set with no events fails to load with TypeError: argument of type 'numpy.uint64' is not iterable. This happens for 1 or 2 channels, with or without channel locations, and for sample_data with its events cleared.
Root causes in src/eegprep/functions/popfunc/pop_loadset_h5.py
read_ref (lines 62-65) returns arr.reshape(-1)[0], so a string or vector keeps only its first element.
The MATLAB_empty marker MATLAB writes for empty arrays isn't recognised. event=[] becomes array([0, 0], uint64) (line 215) and then crashes at _file_io.py:45.
The struct element count uses squeeze (line 82), which breaks for single-element structs.
Data orientation is guessed (lines 261-271), which goes wrong when nbchan == pnts or nbchan == trials.
Why the tests miss it
tests/test_pop_loadset_h5.py:68-78 calls eeg_compare, which only returns a summary string. Nothing asserts on it.
Expected
Loading a v7.3 set gives the same EEG structure as loading the v7 save of the same dataset, and the same structure MATLAB's pop_loadset returns.
Activity
Fix S9 dataset loading and save layout (F15/F26/F34, #497/#561)
Stream 9: Importers and dataset files (F10, F15, F18–F23, F26, F34, F…