[FieldTrip] "Out of memory" during ft_sourceplot

gj gina.joue at univr.it
Wed May 25 13:39:00 CEST 2016


Hi FieldTrippers,

I am trying to do source analysis (eventually source-level connectivity 
analysis) and while plotting the source analysis results with 
ft_sourceplot, I get the following error:

-------------------- error ---------------------------------
Error using  '
Out of memory. Type HELP MEMORY for your options.

Error in pos2transform (line 33)
transform = pos(:,sel)/ind(:,sel);

Error in ft_sourceplot (line 291)
   functional.transform = pos2transform(functional.pos, functional.dim);
--------------------------------------------------------------

Could someone guide me in what I should doublecheck along the way for 
possible errors and how?

Below are the commands I executed leading to the plot command.

Thanks in advance!
Gina

---------------------------------------
      cfg = [];
      cfg.frequency = fft.freq;
      cfg.elec = elecR;          % realigned electrodes
      cfg.method = 'dics';       % only dics seems to give noise proj?
      cfg.grid = lf;             % lf.pos is a 6804x3 double arr 
lf.dim=18,21,18]
      cfg.headmodel = headmodel; % bemcp in mm, mat is 330x4330 double arr
      cfg.keeptrials = 'yes';
      cfg.pcc.fixedori = 'yes';
      cfg.dics.projectnoise = 'yes'; % to norm power in ctr of brain
      cfg.dics.lambda = 0;
      source_avg = ft_sourceanalysis(cfg, fft);
% fft = output from ft_freqanalysis with meth 'mtmfft' and output 'fourier'

      % calc to reduce center of head bias
      sourceNAI = source_avg;
      sourceNAI.avg.pow = source_avg.avg.pow ./ source_avg.avg.noise;


      % reduce the source reconstructed data to the dominant orientation
      cfg = [];
      cfg.projectmom = 'yes'; % project to the direction that explains 
most of the source variance; The three rows of the moment are the 
strength of the source in the x-, y- and z-direction -- how do you limit 
to one direction??
      source_proj = ft_sourcedescriptives(cfg,sourceNAI);
      % src_proj.inside = 6804x1 logical matrix (like template grid)


      % after source recon still in indiv space -- put into std space
      source_proj.dim = std_grid.sourcemodel.dim;
      source_proj.pos = std_grid.sourcemodel.pos;

      % interpolate onto the MNI template brain
      cfg = [];
      cfg.voxelcoord = 'no';
      cfg.parameter = 'all';
      cfg.interpmethod = 'linear';
      source_interp = ft_sourceinterpolate(cfg, source_proj, smri);
      % source_interp.inside/nai/noise/pow is a 41943040x1 double arr!!
      % MESSAGES:
      % the input is volume data with dimensions [512 512 160]
      % the input is source data with 6804 brainordinates on a [18 21 
18] grid

      cfg = [];
      cfg.method = 'slice';
      cfg.funparameter = 'pow';
      cfg.maskparameter = cfg.funparameter;
      cfg.funcolormap = 'jet';
      ft_sourceplot(cfg,source_interp);
      % MESSAGES:
      % the input is source data with 41943040 brainordinates on a
      % [512 512 160] grid



More information about the fieldtrip mailing list