<div dir="ltr">Thanks Max! :) Katrin</div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-05-28 16:24 GMT+02:00 Max Cantor <span dir="ltr"><<a href="mailto:mcantor@umich.edu" target="_blank">mcantor@umich.edu</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">What we usually do before ICA is a rough pass removing the most extremely artifactual trials or channels. For instance, if you see artifacts that are not systematic and are affecting multiple sensors, it may be something like a head scratch that is affecting multiple sensors independently, and so would be turned into multiple ICA components, and so removing these would be beneficial. That being said, anything that might be, for instance, an ECG or EOG artifact, is best not cleaned before ICA, because the whole point of ICA components is to find artifacts that are independent from each other, but dependent to the source (in other words, a systematic artifact as the result of a blink) and remove them without having to throw away the rest of the good data within that trial/channel. In other words, if you're doing a comprehensive artifact rejection before ICA, it makes sense that you aren't necessarily picking up artifactual components, since you might already be removing the data that would be turned into an artifactual component.</div>
<div class="gmail_extra"><div><div class="h5"><br><br><div class="gmail_quote">On Wed, May 28, 2014 at 9:54 AM, KatrinH Heimann <span dir="ltr"><<a href="mailto:katrinheimann@gmail.com" target="_blank">katrinheimann@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Diego, can I ask you another advice- this time more conceptually? I am playing with the ICA now and experience, that I get very different components depending on the artifact detection that I do beforehand. So my idea (due to the literature) was, that the ICA works better on already cleaned data. Now, as I want to do a frequency analysis afterwards, I did not want to reject parts of trials. Therefore I deleted a relatively big amount of trials in which I found muscle artifacts/drifts (Say 25% of the whole amount of trials). However, in fact I see that the ICA then does not give me easily to interpret components anymore - actually the results are better (that is easier to interpret which is artifact, which not) if I include all trials. If I only reject parts of the trials it gets even a bit better. So my question is: Shell I a) do the (stricter) artifact detection rather after the ICA or b) perform it on data with parts of trials marked as bad - in which case I also ask: can I then still reject those components in the uncleaned data (saved beforehand) so that I do not get problems with the frequency analysis afterwards...?! <div>
Thanks a lot for your help!!! Katrin</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-05-28 15:02 GMT+02:00 KatrinH Heimann <span dir="ltr"><<a href="mailto:katrinheimann@gmail.com" target="_blank">katrinheimann@gmail.com</a>></span>:<div>
<div><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Wonderfull! Thanks Diego!!!!<div>Cheers k</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
2014-05-28 14:24 GMT+02:00 Lozano Soldevilla, D. (Diego) <span dir="ltr"><<a href="mailto:d.lozanosoldevilla@fcdonders.ru.nl" target="_blank">d.lozanosoldevilla@fcdonders.ru.nl</a>></span>:<div><div><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-family:Times New Roman;font-size:12pt;color:#000000"><font size="3">Hi Katrin,</font><div style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:12pt">
<br></div><div style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:12pt"><span style="font-size:12pt">First, to display the independent components:</span></div><div style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:12pt">
<span style="font-size:12pt">%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%</span></div><div><div><div>cfg = [];</div><div>cfg.layout = 'CTF151.lay'; % specify the layout file that should be used for plotting</div><div>cfg.viewmode = 'component'</div>
<div>ft_databrowser(cfg, comp)</div></div><div><br></div><div>Take a look to the following example script:</div><div><a href="http://fieldtrip.fcdonders.nl/example/use_independent_component_analysis_ica_to_remove_eog_artifacts" target="_blank">http://fieldtrip.fcdonders.nl/example/use_independent_component_analysis_ica_to_remove_eog_artifacts</a></div>
<div><br></div><div>Second, you'll have to compute the power spectrum for each independent component with ft_freqanalaysis:</div><div><br></div><div>%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%</div><div><div>cfg = [];</div>
<div>cfg.output = 'pow';</div><div>cfg.channel = 'all';%compute the power spectrum in all ICs</div><div>cfg.method = 'mtmfft';</div><div>cfg.taper = 'hanning';</div>
<div>cfg.foi = 2:2:30;</div><div>freq = ft_freqanalysis(cfg, comp);</div><div><br></div><div>And you can plot the spectra:</div><div><br></div><div>%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%</div><div>nsubplots = 25;</div>
<div>nbyn = sqrt(nsubplots);% sqrt(nsubplots) should not contain decimals, type doc subplot</div><div><br></div><div>Nfigs = ceil(size(comp.topo,1)/nsubplots);</div><div>tot = Nfigs*nsubplots;</div><div><br></div><div>rptvect = 1:size(comp.topo,1);</div>
<div>rptvect = padarray(rptvect, [0 tot-size(comp.topo,1)], 0,'post');</div><div>rptvect = reshape(rptvect,nsubplots,Nfigs)';</div><div><br></div><div>for r=1:size(rptvect,1);</div><div> figure;set(gcf,'units','normalized','outerposition',[0 0 1 1]);%full screen</div>
<div> k=0;</div><div> for j=1:size(rptvect,2);</div><div> if~(rptvect(r,j)==0);</div><div> k=k+1;</div><div> cfg=[];</div><div> cfg.channel = rptvect(r,j);</div><div> subplot(nbyn,nbyn,k);ft_singleplotER(cfg,freq);</div>
<div> end</div><div> end</div><div>end</div></div><div><br></div>For the IC topos you'll follow the same logic as above but with:</div><div><br></div><div><div>figure</div><div>cfg = [];</div><div>cfg.component = [1:20]; % specify the component(s) that should be plotted</div>
<div>cfg.layout = 'GSN-HydroCel-129.sfp'; </div><div>cfg.comment = 'no';</div><div>ft_topoplotIC(cfg, comp)</div><div><br></div><div>I hope it helps</div><div><br></div><div>Diego</div><hr style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:12pt">
<blockquote style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:12pt;border-left-width:2px;border-left-style:solid;border-left-color:rgb(16,16,255);margin-left:5px;padding-left:5px"><b>From: </b>"KatrinH Heimann" <<a href="mailto:katrinheimann@gmail.com" target="_blank">katrinheimann@gmail.com</a>><br>
<b>To: </b>"FieldTrip discussion list" <<a href="mailto:fieldtrip@science.ru.nl" target="_blank">fieldtrip@science.ru.nl</a>><br><b>Sent: </b>Wednesday, 28 May, 2014 12:59:38 PM<br><b>Subject: </b>[FieldTrip] ICA - Can I visualize Activity power spectrum of single components?<div>
<div><br><br><div dir="ltr">Dear all,<div>another question: </div><div>Is it possible to visualize the Activity power spectrum of the single components after an ICA by using ft_databrowser (or something else). I like this feature from EEG lab as I find it easier to detect artifactual components. </div>
<div>Thanks a lot for your help</div><div>Katrin</div><div><br></div></div>
<br></div></div>_______________________________________________<br>fieldtrip mailing list<br><a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a><br><a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></blockquote>
<span><font color="#888888"><br><br><br><font size="3">-- </font><br><div style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:12pt"><span name="x"></span>PhD Student<br>Neuronal Oscillations Group<br>
Donders Institute for Brain, Cognition and Behaviour <br>Centre for Cognitive Neuroimaging<br>Radboud University Nijmegen <br>NL-6525 EN Nijmegen<br>The Netherlands<br><a href="http://www.ru.nl/people/donders/lozano-soldevilla-d/" target="_blank">http://www.ru.nl/people/donders/lozano-soldevilla-d/</a><span name="x"></span><br>
</div></font></span></div></div></div><br>_______________________________________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a><br>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br></blockquote></div></div></div><br></div>
</blockquote></div></div></div><br></div>
<br>_______________________________________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a><br>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br></div></div><span class="HOEnZb"><font color="#888888"><div dir="ltr">
Max Cantor<div>Research Assistant</div><div>Computational Neurolinguistics Lab</div><div>University of Michigan</div></div>
</font></span></div>
<br>_______________________________________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br></blockquote></div><br></div>