lrkrol / SEREEGA

SEREEGA: Simulating Event-Related EEG Activity
64 stars 17 forks source link

Making channel labels case-insensitive when building leadfield #23

Open raajc opened 1 year ago

raajc commented 1 year ago

Could we change in lf_generate_fromnyhead.m

line 96: [~, chanidx] = ismember(labels, sa.clab_electrodes); to [~, chanidx] = ismember(lower(labels), lower(sa.clab_electrodes));

Or add an option for this? This would enable a case-insensitive match when custom electrode names are listed.

raajc commented 1 year ago

Also unrelated but changing line 79 in the same file from: if exist('sa_nyhead.mat') ~= 2

to if exist('sa_nyhead.mat', 'file') ~= 2

may be good optimization