[Eeglablist] Adaption of Makoto's batch code to preprocess multiple subjects
Claudio Georgii
Claudio.Georgii at stud.sbg.ac.at
Wed Dec 14 05:42:38 PST 2016
Dear eeglablist,
the original batch code (
https://sccn.ucsd.edu/wiki/Makoto%27s_useful_EEGLAB_code#Example_of_batch_code_to_preprocess_multiple_subjects)
uses continous data and we thought about adapting the code to use it for
epoched data.
This works fine for most of the code, but the "re-referencing" and "adjust
data rank for ICA" section. Because the dimensionality of the data matrix
is now 3D instead of 2D (due to the trial information)
Thus, I wanted to ask, whether the adaptions we made are correct (changes
marked in blue):
% Re-reference to average
EEG.nbchan = EEG.nbchan+1;
EEG.data(end+1, :, :) = zeros(1, EEG.pnts, EEG.trials); %just accounting
for the 3rd dimension
EEG.chanlocs(1,EEG.nbchan).labels = 'initialReference';
EEG = pop_reref( EEG, []);
EEG = pop_select(EEG, 'nochannel', {'initialReference'});
and more importantly:
% Adjust data rank for ICA
g.chanind = 1:EEG.nbchan; %based on computing the rank within 'pop_runica'
tmpdata = reshape(EEG.data(g.chanind, :,:), length(g.chanind),
EEG.pnts*EEG.trials);
tmprank = getrank(double(tmpdata(:,1:min(3000, size(tmpdata,2)))));
channelSubset = loc_subsets(EEG.chanlocs, tmprank);
EEG = pop_select( EEG,'channel', channelSubset{1});
EEG = pop_chanedit(EEG, 'eval','chans = pop_chancenter( chans, [],[]);');
In addition, in our case 'getrank' gives consistently the following warning:
Warning: fixing rank computation inconsistency (56 vs 55) most likely
because running under Linux 64-bit Matlab
We online average reference (during our recording). Might this produce this
warning message and thus can be 'ignored'?
Thank you very much for your help, in advance!
Best,
Claudio
--
Claudio Georgii, MSc.
Phd student
University of Salzburg - Department of Psychology
Eating Behavior Laboratory
Hellbrunnerstraße 34
5020 Salzburg - Austria
Phone: 0043- (0)662 8044 5164
E-Mail: claudio.georgii at sbg.ac.at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20161214/87f5c061/attachment.html>
More information about the eeglablist
mailing list