<div dir="ltr"><div><div>dear community,<br><br>I'm performing analysis of EEG data, which I want to explore for ERP and TF analysis. I aimed at performing two separated analyses, one with filtered data (for ERPs) and another with unfiltered data (for TF, also because I want to see high frequency oscillations),<br><br>I applied ICA to the filtered data to get ride of ocular and other artifacts. Next, I wanted to inject the weights of the ICA into the unfiltered data. Unfortunately I didn't find too much documentation about this, so I hope this will be useful for other users that want to do this (if there is any documentation please let me know).<br><br>What I did was the following:<br>1) In a first step I eliminated the bad components of my filtered data so I get an ICA-pruned dataset,<br>2) Next, I save the ICA variables from my ICA-pruned data set,<br><span style="color:rgb(0,0,255)">    icachansind = EEG.icachansind;<br>    icasphere = EEG.icasphere;<br>    icaweights = EEG.icaweights;</span><br>3) Next, I load my unfiltered data. I make sure any bad channel that need to be removed was removed, and that the data was re-referenced to the average reference. I'm not certain that the average reference is very important, but regarding the bad channels I know that if I inject ICA weights from another dataset they need to have the same number of channels, so if I remove one channel when I perform ICA on the filtered data I need to remove one channel in the unfiltered data to apply the ICA weights. Next, I load the mat files that I save in step 2, and I edit the unfiltered dataset with:<br><span style="color:rgb(0,0,255)">    EEG = pop_editset(EEG, 'icachansind', 'icachansind', 'icaweights', 'icaweights', 'icasphere', 'icasphere');</span><br><span style="color:rgb(0,0,255)">    EEG = eeg_checkset(EEG);</span><br>to integrate the ICA information in the unfiltered dataset. Next, I sort of apply the ICA decomposition with:<br><span style="color:rgb(0,0,255)">    EEG = pop_subcomp(EEG, [ ], 0);<br>    EEG = eeg_checkset(EEG);</span><br>and this certainly eliminate the ocular movements of my unfiletered dataset,<br>4) Next, I interpolated if this is necessary with;<br><span style="color:rgb(0,0,255)">    EEG = pop_interp(EEG, orichannels, 'spherical');<br>    EEG = eeg_checkset(EEG);</span><br>the orichannels correspond to the orginal arrangement of the EEG channels, and this works well to interpolate when there is a missing channel in the dataset,<br>5) Next, I re-reference to the average reference<br><span style="color:rgb(0,0,255)">    EEG = pop_reref(EEG, [ ],'exclude', [65 66]);<br>    EEG = eeg_checkset(EEG);</span><br>    <br>While all looks like it was working good, I noted that my unfiltered dataset was drastically changed. For some channels the amplitude of the signal was really diminished and looked like it was flat, but actually was just really diminished.<br><br>I went to back to my pipeline.<br>When I did ICA I set the rank to: all channels minus 3 (-1 due to the average reference and -2 due to both EOG channels)<br><span style="color:rgb(0,0,255)">    EEG = pop_runica(EEG, 'icatype', 'runica', 'extended', 1,'interupt', 'on','chanind', [1:EEG.nbchan-3]);</span><br><br>So, for a given subject the dimensions for the icachansind, icasphere, and icaweights variables were <b>1x63, 63x63 and 43x63</b> (so 66 [64 EEG channels + 2 EOG channels] -3). However, for this same subject the number of channels for the unfiltered dataset is <b>66</b>. I think this is inconsistency is screwing up my data, however I don't know how this should be done to overcome my problem,<br><br>I find a message in the eeglab list about this but the procedure is not clear to me <a href="https://sccn.ucsd.edu/pipermail/eeglablist/2013/006294.html">https://sccn.ucsd.edu/pipermail/eeglablist/2013/006294.html</a><br><br></div><div>I hope the description is good enough to show what my problem is,<br></div><div><br></div>Any directions about this will be really appreciated,<br><br></div>Jose<br></div>