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
Importing a window shorter than the channel count fails with "Cannot determine channel-major orientation" #485
On develop d70be54a, every 1-second window fails ([0,1], [1,2], [3,4], [0.5,1.5]), because each has 256 samples and the file has 257 channels. The window [1,5] loads. EEGLAB pop_biosig loads all of these windows.
Cause:_file_io.mne_raw_to_eeg calls eeg_from_data without nbchan, so the orientation has to be guessed from the array shape. pop_biosig and pop_fileio both use that function. pop_read_erpss and pop_snapread also leave out nbchan.
Fix:
Pass nbchan=len(raw.ch_names) in mne_raw_to_eeg.
Pass the known channel count in pop_read_erpss and pop_snapread.
Add a regression test on jo1_3.bdf with blockrange=[3,4], compared against MATLAB pop_biosig.
Found while verifying #484. The bug was already on develop before that PR.
Activity