[FieldTrip] help

jan-mathijs schoffelen jan.schoffelen at donders.ru.nl
Tue Nov 12 09:48:13 CET 2013


Hi Max,

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.
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).

Best,
Jan-Mathijs

On Nov 11, 2013, at 4:46 PM, Max Cantor wrote:

> 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.
> 
> Thank you,
> Max
> 
> 
> On Fri, Nov 8, 2013 at 5:14 AM, Stephen Whitmarsh <stephen.whitmarsh at gmail.com> wrote:
> Hi Sendy, JM,
> 
> 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.
> 
> Cheers,
> Stephen
> 
> 
> 
> 
> On 8 November 2013 11:08, jan-mathijs schoffelen <jan.schoffelen at donders.ru.nl> wrote:
> 
> Hi Sendy,
> 
> You may want to have a look at the following link:
> 
> http://fieldtrip.fcdonders.nl/faq/why_does_my_ica_output_contain_complex_numbers?s[]=component
> 
> 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.
> 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.
> 
> Best
> Jan-Mathijs
> 
> On Nov 8, 2013, at 10:47 AM, Sendy Caffarra wrote:
> 
>> Hi,
>> 
>> 
>> I'm using Fieldtrip to analyze my Meg data.
>> Actually, I'm trying to reject ocular artifacts by using ICA.
>> I decreased the sample rate to 300 and I performed the ICA analysis as following:
>> 
>> cfg = [];
>> cfg.resamplefs = 300;
>> cfg.detrend    = 'no';
>> data_1_rspl = ft_resampledata(cfg, data_1);
>> %ICA
>> cfg            = [];
>> cfg.method = 'runica';
>> comp           = ft_componentanalysis(cfg, data_1_rspl);
>> 
>> 
>> It worked, but now when I try to visualize the different ICA components using:
>> 
>> cfg                 = [];
>> cfg.layout          = 'neuromag306mag.lay'; % specify the layout file that should be used for plotting
>> cfg.viewmode        = 'component';
>> ft_databrowser(cfg, comp);
>> 
>> I can see how the waves look like, but I cannot see the topographic distribution of them.
>> 
>> And Matlab gives me this error:
>> 
>> ??? Error using ==> surf at 78
>> X, Y, Z, and C cannot be complex.
>> 
>> Error in ==> ft_plot_topo at 251
>>  h = surf(Xi-deltax/2,Yi-deltay/2,zeros(size(Zi)), Zi, 'EdgeColor', 'none', 'FaceColor',
>>  shading);
>> 
>> Error in ==> ft_databrowser>redraw_cb at 1850
>>      ft_plot_topo(chanx, chany, chanz, 'mask', ...
>> 
>> Error in ==> ft_databrowser at 671
>> redraw_cb(h);
>> 
>> 
>> Could you help me in solving this problem?
>> I also downloaded the latest version of fieldtrip but it still does not work.
>> 
>> Thanks for your help.
>> 
>> Sendy
>> 
>> 
>> Sendy Caffarra
>> Postdoctoral researcher BCBL
>> www.bcbl.eu
>> 
>> _______________________________________________
>> fieldtrip mailing list
>> fieldtrip at donders.ru.nl
>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> 
> Jan-Mathijs Schoffelen, MD PhD 
> 
> Donders Institute for Brain, Cognition and Behaviour, 
> Centre for Cognitive Neuroimaging,
> Radboud University Nijmegen, The Netherlands
> 
> Max Planck Institute for Psycholinguistics,
> Nijmegen, The Netherlands
> 
> J.Schoffelen at donders.ru.nl
> Telephone: +31-24-3614793
> 
> http://www.hettaligebrein.nl
> 
> 
> _______________________________________________
> 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
> 
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip

Jan-Mathijs Schoffelen, MD PhD 

Donders Institute for Brain, Cognition and Behaviour, 
Centre for Cognitive Neuroimaging,
Radboud University Nijmegen, The Netherlands

Max Planck Institute for Psycholinguistics,
Nijmegen, The Netherlands

J.Schoffelen at donders.ru.nl
Telephone: +31-24-3614793

http://www.hettaligebrein.nl

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20131112/8b5c0de1/attachment-0002.html>


More information about the fieldtrip mailing list