[FieldTrip] ft_source2sparse usage for EEG data

gj gina.joue at univr.it
Sat May 7 19:34:33 CEST 2016


Sorry about that!! Good to know...I follow the forum threaded, so I made 
the false assumption that others do the same and that given the volume 
of emails/info overload and overworked forum-answering Samaritans these 
days that it was better to be concise rather than reiterate previous 
info...I do fully appreciate that people are kindly answering forum 
questions completely out of their good will -- without which I would be 
(more) lost and tearing more of my hair out -- so I FULLY appreciate you 
guys and, contrary to the end effect, I really do make an effort to try 
and package my questions....

To summarize, I am trying to use FieldTrip ver.20160309 to run a 
whole-brain network analysis on source level on a 2-sec continuous 
recording of EEG (preprocessed and averaged across all trials per 
condition per subject in another software -- I manually put the data in 
Fieldtrip format). Note that in trying to hack a way around the problem 
I've since reworked the data multiple times -- hence the numbers below 
are now not the same as what I previously posted, but the error is the same.

Following the tutorials (for MEG: 
http://www.fieldtriptoolbox.org/tutorial/networkanalysis), I first run 
ft_source2sparse to reduce the matrix to only voxels inside the skull:

>> source_sparse = ft_source2sparse(source_proj);
total number of dipoles        : 6804
number of dipoles inside  brain: 3294
number of dipoles outside brain: 3510

When I then try to run the connectivity analysis 
(ft_connectivityanalysis), regardless of which connectivity method (I've 
tried the various options), e.g.

cfg.method  ='coh';
cfg.complex = 'absimag';
source_conn = ft_connectivityanalysis(cfg, source_sparse);

I get the error:

------------ error -----------
Requested 23058x23058 (7.9GB) array exceeds maximum array size 
preference. Creation
of arrays greater than this limit may take a long time and cause MATLAB 
to become
unresponsive. See array size limit or preference panel for more information.

Error in univariate2bivariate (line 314)
           data.crsspctrm = (transpose(mom)*conj(mom))./nrpt;

Error in ft_connectivityanalysis (line 434)
         [data, powindx, hasrpt] = univariate2bivariate(data, 'mom', 
         dtype, 'cmb', cfg.refindx, 'keeprpt', 0);
------------ end error -----------

In univariate2bivariate(), it goes into "source moments are 
multivariate" with

size(data.mom,1) = 3294
sizmom = [3, 7]

Does this mean there were 3 dominant orientations of the source 
reconstructed data? I had done the projection with the following call:

cfg = [];
cfg.projectmom = 'yes';
source_proj = ft_sourcedescriptives(cfg,source);

At a loss -- not sure whether I set up something incorrectly? Thanks a 
mil in advance for any help or tips on where to troubleshoot!!!

More information about the fieldtrip mailing list