<div dir="ltr"><div><div><div>Dear eeglablist,<br><br></div>the original batch code (<a href="https://sccn.ucsd.edu/wiki/Makoto%27s_useful_EEGLAB_code#Example_of_batch_code_to_preprocess_multiple_subjects">https://sccn.ucsd.edu/wiki/Makoto%27s_useful_EEGLAB_code#Example_of_batch_code_to_preprocess_multiple_subjects</a>) uses continous data and we thought about adapting the code to use it for epoched data.<br></div>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)<br><br></div>Thus, I wanted to ask, whether the adaptions we made are correct (changes marked in blue):<br><br>% Re-reference to average<br>EEG.nbchan = EEG.nbchan+1;<br><span style="color:rgb(0,0,255)">EEG.data(end+1, :, :) = zeros(1, EEG.pnts, EEG.trials);</span> <span style="color:rgb(255,153,0)">%just accounting for the 3rd dimension</span><br>EEG.chanlocs(1,EEG.nbchan).labels = 'initialReference';<br>EEG = pop_reref( EEG, []);<br>EEG = pop_select(EEG, 'nochannel', {'initialReference'});<br><br><div><div><div><div><div><div>and more importantly:<br>% Adjust data rank for ICA<br><span style="color:rgb(0,0,255)">g.chanind = 1:EEG.nbchan;</span> <span style="color:rgb(255,153,0)">%based on computing the rank within 'pop_runica'</span><br>t<span style="color:rgb(0,0,255)">mpdata = reshape(EEG.data(g.chanind, :,:), length(g.chanind), EEG.pnts*EEG.trials); <br>tmprank = getrank(double(tmpdata(:,1:min(3000, size(tmpdata,2)))));</span><br>channelSubset = loc_subsets(EEG.chanlocs, tmprank);<br>EEG = pop_select( EEG,'channel', channelSubset{1});<br>EEG = pop_chanedit(EEG, 'eval','chans = pop_chancenter( chans, [],[]);');<br><br></div><div>In addition, in our case 'getrank' gives consistently the following warning:<br><br>Warning: fixing rank computation inconsistency (56 vs 55) most likely because running under Linux 64-bit Matlab<br><br></div><div>We online average reference (during our recording). Might this produce this warning message and thus can be 'ignored'?<br><br></div><div>Thank you very much for your help, in advance!<br><br></div><div>Best,<br></div><div>Claudio <br></div><div>-- <br><div class="gmail_signature"><div dir="ltr"><div>Claudio Georgii, MSc.<br></div><div>Phd student<br></div><div>University of Salzburg - Department of Psychology<br></div><div>Eating Behavior Laboratory<br></div><div>Hellbrunnerstraße 34<br></div><div>5020 Salzburg - Austria<br><br></div><div>Phone: 0043- (0)662 8044 5164<br></div><div>E-Mail: <a href="mailto:claudio.georgii@sbg.ac.at" target="_blank">claudio.georgii@sbg.ac.at</a><br></div></div></div>
</div></div></div></div></div></div></div>