Issue when reading channel locations from Brainstorm file with empty SCS field
nguyen-td opened this issue · comments
Tien Dung Nguyen commented
Description
Similar to #761 but the current version throws the error Index exceeds the number of array elements. Index must not exceed 0.
when the elocIn.SCS
field is empty. I am trying to convert this Brainstorm chanlocs file into EEGLAB's chanlocs format.
Extending
eeglab/functions/sigprocfunc/readlocs.m
Line 426 in 02a306c
by
if isfield(elocIn.SCS, chans{iChan}) && ~isempty(elocIn.SCS.(chans{iChan}))
will fix it.
Steps to Reproduce
- Download the Brainstorm chanlocs here
- Run
readlocs('channel_BrainProducts_ActiCap_97.mat');
Versions
OS version | macOS Sonoma 14.3 |
Matlab version | R2024a |
EEGLAB version | dev |
Arnaud Delorme commented
Thanks. This has been fixed in cf60b0a