LIMO-EEG-Toolbox / limo_tools

Hierarchical Linear Modelling for MEEG data
https://limo-eeg-toolbox.github.io/limo_meeg/
Other
59 stars 27 forks source link

Improvement: limo_neighbourdist #24

Closed behinger closed 4 years ago

behinger commented 5 years ago

I improved the neighbourdist a bit

For the transformation from eeg2fieldtrip we don't actually need to reshape the whole dataset, this will improve runtime a lot.

% speedup for large datasets
EEG.data = EEG.data(:,1,1);
EEG.trials = 1;
EEG.pnts = 1;
tmpcfg = limo_eeglab2fieldtrip(EEG, 'preprocessing', 'none');

We should be able to specify the neighbourdist without the gui popup

function channeighbstructmat = limo_neighbourdist(EEG,neighbourdist)
if nargin == 1
    neighbourdist = eval(cell2mat(inputdlg('enter neighbourhood distance','neighbourhood distance'))); % 0.37 for biosemi 128;
end
tmpcfg.neighbourdist = neighbourdist;
[neighbours,channeighbstructmat] = limo_ft_neighbourselection(tmpcfg, []); % fieldtrip function
CPernet commented 4 years ago

done, thx