[FieldTrip] Modification of ft_timelockgrandaverage cfg.keepindividual
jan-mathijs schoffelen
jan.schoffelen at donders.ru.nl
Thu Feb 10 12:17:21 CET 2011
Dear Lucie,
Yes, indeed this has recently been changed. The logic behind it is the
following:
One either typically wants to keep the individuals, OR the average.
If in your case you need the average, you have to specify
cfg.keepindividual = 'no';
Keeping both the average and the individual leads to an inconsistent
definition of the data structure.
The field 'dimord' does not allow for an unequivocal interpretation of
both indidual and avg are present.
If you need both the individual, and the avg, you now need to run
ft_timelockgrandaverage twice, once with cfg.keepinididual = 'yes',
and once with cfg.keepindividual = 'no';
Best wishes,
Jan-Mathijs
On Feb 10, 2011, at 11:58 AM, Lucie Charles wrote:
> 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
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
Dr. J.M. (Jan-Mathijs) Schoffelen
Donders Institute for Brain, Cognition and Behaviour,
Centre for Cognitive Neuroimaging,
Radboud University Nijmegen, The Netherlands
J.Schoffelen at donders.ru.nl
Telephone: 0031-24-3614793
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20110210/eb014eaa/attachment-0002.html>
More information about the fieldtrip
mailing list