[FieldTrip] help

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


Dear all,

As a comment to Peter's reply: the fastica code internally applies PCA to the data by removing all small signal components. In this respect runica does not behave differently if you specify cfg.runica.pca = 70 (provided that fastica estimates the number of components to retain is 70).

Best,
Jan-Mathijs


On Nov 12, 2013, at 4:41 AM, Peter Goodin wrote:

> Hi Sendy, 
> 
> TL;DR - Use fastica. 
> 
> Long version:  The problem is due to Max filtering your data. You think you should have 305 components (n channels - 1) but due to the removal of some components during the Max filtering process it's more like 70 (tsss changes that figure again). There's been some discussion on this list previously about it where the suggestion was to use PCA to limit the components to ~70. On the EEGlab mailing list however there's talk that apparently using PCA can effect data quality. To get around this, instead of using an algorithm like runica, I use fastica. It automatically accounts for the reduced rank of the data using a co-variance matrix and produces comparable results (from my own tinkering). 
> 
> Hope this helps, 
> 
> Peter
> 
> __________________________
> Peter Goodin,
> BSc (Hons), Ph.D Candidate.
> 
> Brain and Psychological Sciences Research Centre (BPsych)
> Swinburne University,
> Hawthorn, Vic, 3122
> 
> Monash Alfred Psychiatry Research Centre (MAPrc)
> Level 4, 607 St Kilda Road,
> Melbourne 3004
> 
> ________________________________________
> From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Sendy Caffarra [s.caffarra at bcbl.eu]
> Sent: Tuesday, 12 November 2013 3:33 AM
> To: FieldTrip discussion list
> Cc: FieldTrip discussion list
> Subject: Re: [FieldTrip] help
> 
> Hi Fieldtrip users,
> 
> I tried to select MEG as channels and I reduced the rank of my data, as following:
> 
> cfg=[];
> cfg.runica.pca = 306;
> cfg.channel         = 'MEG';
> comp = ft_componentanalysis(cfg, data);
> 
> ...but I still get the same error as before.
> Are there any other reasons that could produce this error?
> 
> Thanks in advance,
> Sendy
> 
> 
> Sendy Caffarra
> Postdoctoral researcher BCBL
> www.bcbl.eu
> 
> ----- Original Message -----
> From: "Max Cantor" <mcantor at umich.edu>
> To: "FieldTrip discussion list" <fieldtrip at science.ru.nl>
> Sent: Monday, November 11, 2013 4:46:53 PM
> Subject: Re: [FieldTrip] help
> 
> 
> 
> 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
> _______________________________________________
> 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/bea8d3de/attachment-0002.html>


More information about the fieldtrip mailing list