[FieldTrip] ICA - Can I visualize Activity power spectrum of single components?

KatrinH Heimann katrinheimann at gmail.com
Wed May 28 17:50:09 CEST 2014


Thanks Max! :) Katrin


2014-05-28 16:24 GMT+02:00 Max Cantor <mcantor at umich.edu>:

> 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.
>
>
> On Wed, May 28, 2014 at 9:54 AM, KatrinH Heimann <katrinheimann at gmail.com>wrote:
>
>> 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...?!
>> Thanks a lot for your help!!! Katrin
>>
>>
>> 2014-05-28 15:02 GMT+02:00 KatrinH Heimann <katrinheimann at gmail.com>:
>>
>> Wonderfull! Thanks Diego!!!!
>>> Cheers k
>>>
>>>
>>> 2014-05-28 14:24 GMT+02:00 Lozano Soldevilla, D. (Diego) <
>>> d.lozanosoldevilla at fcdonders.ru.nl>:
>>>
>>> Hi Katrin,
>>>>
>>>> First, to display the independent components:
>>>> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>>>> cfg = [];
>>>> cfg.layout = 'CTF151.lay'; % specify the layout file that should be
>>>> used for plotting
>>>> cfg.viewmode = 'component'
>>>> ft_databrowser(cfg, comp)
>>>>
>>>> Take a look to the following example script:
>>>>
>>>> http://fieldtrip.fcdonders.nl/example/use_independent_component_analysis_ica_to_remove_eog_artifacts
>>>>
>>>> Second, you'll have to compute the power spectrum for each independent
>>>> component with ft_freqanalaysis:
>>>>
>>>> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>>>> cfg              = [];
>>>> cfg.output       = 'pow';
>>>> cfg.channel      = 'all';%compute the power spectrum in all ICs
>>>> cfg.method       = 'mtmfft';
>>>> cfg.taper        = 'hanning';
>>>> cfg.foi          = 2:2:30;
>>>> freq = ft_freqanalysis(cfg, comp);
>>>>
>>>> And you can plot the spectra:
>>>>
>>>> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>>>> nsubplots = 25;
>>>> nbyn = sqrt(nsubplots);% sqrt(nsubplots) should not contain decimals,
>>>> type doc subplot
>>>>
>>>> Nfigs = ceil(size(comp.topo,1)/nsubplots);
>>>> tot = Nfigs*nsubplots;
>>>>
>>>> rptvect = 1:size(comp.topo,1);
>>>> rptvect = padarray(rptvect, [0 tot-size(comp.topo,1)], 0,'post');
>>>> rptvect = reshape(rptvect,nsubplots,Nfigs)';
>>>>
>>>> for r=1:size(rptvect,1);
>>>>   figure;set(gcf,'units','normalized','outerposition',[0 0 1 1]);%full
>>>> screen
>>>>   k=0;
>>>>   for j=1:size(rptvect,2);
>>>>     if~(rptvect(r,j)==0);
>>>>       k=k+1;
>>>>       cfg=[];
>>>>       cfg.channel = rptvect(r,j);
>>>>       subplot(nbyn,nbyn,k);ft_singleplotER(cfg,freq);
>>>>     end
>>>>   end
>>>> end
>>>>
>>>> For the IC topos you'll follow the same logic as above but with:
>>>>
>>>> figure
>>>> cfg = [];
>>>> cfg.component = [1:20];       % specify the component(s) that should be
>>>> plotted
>>>> cfg.layout    = 'GSN-HydroCel-129.sfp';
>>>> cfg.comment   = 'no';
>>>> ft_topoplotIC(cfg, comp)
>>>>
>>>> I hope it helps
>>>>
>>>> Diego
>>>> ------------------------------
>>>>
>>>> *From: *"KatrinH Heimann" <katrinheimann at gmail.com>
>>>> *To: *"FieldTrip discussion list" <fieldtrip at science.ru.nl>
>>>> *Sent: *Wednesday, 28 May, 2014 12:59:38 PM
>>>> *Subject: *[FieldTrip] ICA - Can I visualize Activity power spectrum
>>>> of single        components?
>>>>
>>>>
>>>> Dear all,
>>>> another question:
>>>> 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.
>>>> Thanks a lot for your help
>>>> Katrin
>>>>
>>>>
>>>> _______________________________________________
>>>> fieldtrip mailing list
>>>> fieldtrip at donders.ru.nl
>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> PhD Student
>>>> Neuronal Oscillations Group
>>>> Donders Institute for Brain, Cognition and Behaviour
>>>> Centre for Cognitive Neuroimaging
>>>> Radboud University Nijmegen
>>>> NL-6525 EN Nijmegen
>>>> The Netherlands
>>>> http://www.ru.nl/people/donders/lozano-soldevilla-d/
>>>>
>>>> _______________________________________________
>>>> fieldtrip mailing list
>>>> fieldtrip at donders.ru.nl
>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>>>>
>>>
>>>
>>
>> _______________________________________________
>> fieldtrip mailing list
>> fieldtrip at donders.ru.nl
>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>>
>
>
>
> --
> Max Cantor
> Research Assistant
> Computational Neurolinguistics Lab
> University of Michigan
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20140528/b3e406e0/attachment-0002.html>


More information about the fieldtrip mailing list