[FieldTrip] Modification of ft_timelockgrandaverage cfg.keepindividual

Lucie Charles lucie.charles.ens at googlemail.com
Thu Feb 10 11:58:43 CET 2011


Hello everyone,

It seems that there has been a modification of ft_timelockgrandaverage : now
if you specify cfg.keepindividual = 'yes', the grandaverage is computed but
is not included in the output of the function (see above).

Why is that ? Many of my scripts rely on this option and I wanted to know if
there was a good reason for it.

Thanks,

Lucie

New version of ft_timelockgrandaverage (downloaded yesterday), line 159-176

%--------------------------------------------
% % collect the results
%--------------------------------------------

grandavg           = [];
grandavg.label     = cfg.channel;       % cell-array
%grandavg.fsample   = varargin{1}.fsample; % fsample is obsolete
grandavg.time      = ResultsTime;       % 1 x Nsamples

%KEEP INDIVIDUAL MEANS?
if strcmp(cfg.keepindividual, 'yes')
*  grandavg.individual = avgmat;         % Nsubj x Nchan x Nsamples
  grandavg.dimord = 'subj_chan_time';*
else
*  grandavg.avg    = ResultGrandavg;     % Nchan x Nsamples*
  grandavg.var    = ResultVar;          % Nchan x Nsamples
  grandavg.dimord = 'chan_time';
end

Older version of ft_timelockgrandaverage (april 2010)

%--------------------------------------------
% % collect the results
%--------------------------------------------

%SWITCH CHANNEL TO LABEL?
grandavg.label     = cfg.channel;       % cell-array
grandavg.fsample   = varargin{1}.fsample;
grandavg.avg       = ResultGrandavg;        % Nchan x Nsamples
grandavg.var       = ResultVar;           % Nchan x Nsamples
grandavg.time      = ResultsTime;       % 1 x Nsamples

%KEEP INDIVIDUAL MEANS?
if strcmp(cfg.keepindividual, 'yes')
  grandavg.individual = avgmat;         % Nsubj x Nchan x Nsamples
  grandavg.dimord = 'subj_chan_time';
else
  grandavg.dimord = 'chan_time';
end


-- 
Lucie CHARLES

INSERM-CEA Cognitive Neuroimaging unit

CEA/SAC/DSV/DRM/NeuroSpin
Bât 145, Point Courrier 156
F-91191 Gif/Yvette, FRANCE
Tel : +33 1 69 08 99 74
Fax : +33 1 69 08 79 73
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20110210/d19122d2/attachment.html>


More information about the fieldtrip mailing list