<div dir="ltr">So we decided to remove both linked mastoid references for the ICA, and it works just fine now. Thank you so much!</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Nov 12, 2013 at 9:11 AM, Max Cantor <span dir="ltr"><<a href="mailto:mcantor@umich.edu" target="_blank">mcantor@umich.edu</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"><div style="font-family:arial,sans-serif;font-size:13px">Hi Jan-Mathijs,</div><div style="font-family:arial,sans-serif;font-size:13px">
<br></div><span style="font-family:arial,sans-serif;font-size:13px">I had assumed that 'refchan' was a built in fieldtrip thing, that makes more sense now! However, I'm unsure of whether I am supposed to be removing the implicit reference, or the (in my case) linked mastoid references. I ran the data using the cfg.runica.pca = N-1 parameters (I did it as N-2 actually, for the linked mastoid references) as described in the fieldtrip FAQ, Peter, and you, but the data did come out a bit weird, and I would prefer ICA over PCA, so I'll definitely try this as well and see if I get results that make more sense to me.</span><br>

</div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Nov 12, 2013 at 4:30 AM, Sendy Caffarra <span dir="ltr"><<a href="mailto:s.caffarra@bcbl.eu" target="_blank">s.caffarra@bcbl.eu</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks a lot.<br>
Now it works ;)<br>
<span><font color="#888888"><br>
<br>
Sendy<br>
</font></span><div><br>
----- Original Message -----<br>
From: "jan-mathijs schoffelen" <<a href="mailto:jan.schoffelen@donders.ru.nl" target="_blank">jan.schoffelen@donders.ru.nl</a>><br>
To: "FieldTrip discussion list" <<a href="mailto:fieldtrip@science.ru.nl" target="_blank">fieldtrip@science.ru.nl</a>><br>
</div><div><div>Sent: Tuesday, November 12, 2013 9:48:13 AM<br>
Subject: Re: [FieldTrip] help<br>
<br>
<br>
Hi Max,<br>
<br>
<br>
When you specify the channel to be left out, you have to name it according to how it's named in your data. I believe that the 'refchan' is only called like that for the purpose of the example.<br>
So, when you have a single reference channel, named 'thisisthenameofyourreferencechannel', you need to specify '-thisisthenameofmyreferencechannel', rather than '-refchan'. Sorry for exaggerating, but perhaps the silly name brings across the message more clearly. Note, that when you have applied a common average reference, you could at random remove a channel (not advisable). In that case I'd specify the dimensionality of your data space prior to calling ft_componentanalysis, as cfg.runica.pca = N-1 (N being the number of EEG channels).<br>


<br>
<br>
Best,<br>
Jan-Mathijs<br>
<br>
<br>
<br>
On Nov 11, 2013, at 4:46 PM, Max Cantor wrote:<br>
<br>
<br>
<br>
I'm having this issue as well, only with EEG data, and at resamplefs = 150. I've added '-refchan' to my cfg.channel for ft_componentanalysis, and also set path for EEGlab toolbox, but the issue persists. Any help would be greatly appreciated.<br>


<br>
<br>
Thank you,<br>
Max<br>
<br>
<br>
<br>
On Fri, Nov 8, 2013 at 5:14 AM, Stephen Whitmarsh < <a href="mailto:stephen.whitmarsh@gmail.com" target="_blank">stephen.whitmarsh@gmail.com</a> > wrote:<br>
<br>
<br>
<br>
Hi Sendy, JM,<br>
<br>
<br>
In addition, that error also happens (or used to, at least) when you have not selected MEG as channels, therefor applying ICA e.g. also on your EOG channels etc. as well.<br>
<br>
<br>
Cheers,<br>
Stephen<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
On 8 November 2013 11:08, jan-mathijs schoffelen < <a href="mailto:jan.schoffelen@donders.ru.nl" target="_blank">jan.schoffelen@donders.ru.nl</a> > wrote:<br>
<br>
<br>
<br>
<br>
<br>
<br>
Hi Sendy,<br>
<br>
<br>
You may want to have a look at the following link:<br>
<br>
<br>
<a href="http://fieldtrip.fcdonders.nl/faq/why_does_my_ica_output_contain_complex_numbers?s[]=component" target="_blank">http://fieldtrip.fcdonders.nl/faq/why_does_my_ica_output_contain_complex_numbers?s[]=component</a><br>


<br>
<br>
I assume that your data has been passed through the MaxFilter, which massively reduces the rank of your data, causing the ICA algorithm to spit out complex valued numbers.<br>
You need to reduce the rank of your data prior to running the component decomposition, to be less that then true rank in your data.<br>
<br>
<br>
Best<br>
Jan-Mathijs<br>
<br>
<br>
<br>
<br>
On Nov 8, 2013, at 10:47 AM, Sendy Caffarra wrote:<br>
<br>
<br>
<br>
Hi,<br>
<br>
<br>
I'm using Fieldtrip to analyze my Meg data.<br>
Actually, I'm trying to reject ocular artifacts by using ICA.<br>
I decreased the sample rate to 300 and I performed the ICA analysis as following:<br>
<br>
cfg = [];<br>
cfg.resamplefs = 300;<br>
cfg.detrend = 'no';<br>
data_1_rspl = ft_resampledata(cfg, data_1);<br>
%ICA<br>
cfg = [];<br>
cfg.method = 'runica';<br>
comp = ft_componentanalysis(cfg, data_1_rspl);<br>
<br>
<br>
It worked, but now when I try to visualize the different ICA components using:<br>
<br>
cfg = [];<br>
cfg.layout = 'neuromag306mag.lay'; % specify the layout file that should be used for plotting<br>
cfg.viewmode = 'component';<br>
ft_databrowser(cfg, comp);<br>
<br>
I can see how the waves look like, but I cannot see the topographic distribution of them.<br>
<br>
And Matlab gives me this error:<br>
<br>
??? Error using ==> surf at 78<br>
X, Y, Z, and C cannot be complex.<br>
<br>
Error in ==> ft_plot_topo at 251<br>
h = surf(Xi-deltax/2,Yi-deltay/2,zeros(size(Zi)), Zi, 'EdgeColor', 'none', 'FaceColor',<br>
shading);<br>
<br>
Error in ==> ft_databrowser>redraw_cb at 1850<br>
ft_plot_topo(chanx, chany, chanz, 'mask', ...<br>
<br>
Error in ==> ft_databrowser at 671<br>
redraw_cb(h);<br>
<br>
<br>
Could you help me in solving this problem?<br>
I also downloaded the latest version of fieldtrip but it still does not work.<br>
<br>
Thanks for your help.<br>
<br>
Sendy<br>
<br>
<br>
Sendy Caffarra<br>
Postdoctoral researcher BCBL<br>
<a href="http://www.bcbl.eu" target="_blank">www.bcbl.eu</a><br>
<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>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
Jan-Mathijs Schoffelen, MD PhD<br>
<br>
<br>
Donders Institute for Brain, Cognition and Behaviour,<br>
Centre for Cognitive Neuroimaging,<br>
Radboud University Nijmegen, The Netherlands<br>
<br>
<br>
Max Planck Institute for Psycholinguistics,<br>
Nijmegen, The Netherlands<br>
<br>
<br>
<a href="mailto:J.Schoffelen@donders.ru.nl" target="_blank">J.Schoffelen@donders.ru.nl</a><br>
Telephone: <a href="tel:%2B31-24-3614793" value="+31243614793" target="_blank">+31-24-3614793</a><br>
<br>
<br>
<a href="http://www.hettaligebrein.nl" target="_blank">http://www.hettaligebrein.nl</a><br>
<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>
<br>
<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>
<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>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
Jan-Mathijs Schoffelen, MD PhD<br>
<br>
<br>
Donders Institute for Brain, Cognition and Behaviour,<br>
Centre for Cognitive Neuroimaging,<br>
Radboud University Nijmegen, The Netherlands<br>
<br>
<br>
Max Planck Institute for Psycholinguistics,<br>
Nijmegen, The Netherlands<br>
<br>
<br>
<a href="mailto:J.Schoffelen@donders.ru.nl" target="_blank">J.Schoffelen@donders.ru.nl</a><br>
Telephone: <a href="tel:%2B31-24-3614793" value="+31243614793" target="_blank">+31-24-3614793</a><br>
<br>
<br>
<a href="http://www.hettaligebrein.nl" target="_blank">http://www.hettaligebrein.nl</a><br>
<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>
_______________________________________________<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>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>