<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Dear Lucie,<div><br></div><div>Thank you very much for your feedback. I take the liberty to anyhow post this to the discussion list, so that other people may take notice / join in the discussion / etc.</div><div><br><div><blockquote type="cite">Thanks a lot for this quick response : I understand the logic behind this. It's true that I noticed some inconsistencies due to the interpretation of the field dimord which can't be well defined if you have both individual and average data in your structure.<br></blockquote><div><br></div><div>OK</div><br><blockquote type="cite">However, I think many people were happy with this option as it was. It's quite handy to keep both the average and individual data because you can compute statistics and at the same time you don't have to redo the average every time. I think a lot of scripts rely on that at least in our lab.<br></blockquote><div><br></div><div>The historical purpose for supporting cfg.keepindividual = 'yes', was in order to get a representation of all single subjects' data in a single data matrix: data.individual. Nowadays, ft_timelockstatistics supports multiple data structures in the input, i.e. ft_timelockstatistics(cfg, subj1, subj2 subj3, etc) so I think the call to ft_timelockgrandaverage could even be bypassed.</div><div>The FieldTrip development team is very keen on providing backward compatibility support. While in general this is feasible for the functions which are in FieldTrip, it is very difficult to realize for lab-specific scripts. In this particular example I think that clarity of the data representation should prevail over backward compatibility issues, particularly because in this case there's an easy workaround: just call ft_timelockgrandaverage twice. Moreover, a clean and unambiguous data representation is a prerequisite for further developing the software, and keeping the historical 'oddity' will only hamper code development.</div><div><br></div><blockquote type="cite"> Furthermore, it's a bit strange to have a function called ft_timelockgrandaverage which doesn't compute any grandaverage in some cases !<br></blockquote><div><br></div><div>I agree, yet see my point above. Some people may just like to have the data represented in a single matrix.</div><br><blockquote type="cite"><br>I would suggest to keep the function as it is but add more options (such as cfg.dimord = 'avg' or 'individual') to make the experimenter aware of this issue and to solve further computation problem. <br></blockquote><div><br></div><div>I hope I could convince you that our philosophy makes sense and that you and your lab-mates are willing to make the effort of adjusting the scripts a bit for future analyses. If very problematic, I would advice for the current analyses to rely on an old version of ft_timelockgrandaverage.</div><div><br></div><div>Best wishes,</div><div><br></div><div>Jan-Mathijs</div><div><br></div><div><br></div><br><blockquote type="cite">Thank you again, <br><br>Lucie<br><br>PS : I've sent this email only to you as this is just a suggestion which might not be relevant for all users.<br><br><br><div class="gmail_quote">2011/2/10 jan-mathijs schoffelen <span dir="ltr"><<a href="mailto:jan.schoffelen@donders.ru.nl">jan.schoffelen@donders.ru.nl</a>></span><br> <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div style="word-wrap: break-word;">Dear Lucie,<div><br></div><div>Yes, indeed this has recently been changed. The logic behind it is the following:</div> <div><br></div><div>One either typically wants to keep the individuals, OR the average.</div><div><br></div><div>If in your case you need the average, you have to specify cfg.keepindividual = 'no';</div><div><br> </div> <div>Keeping both the average and the individual leads to an inconsistent definition of the data structure.</div><div>The field 'dimord' does not allow for an unequivocal interpretation of both indidual and avg are present.</div> <div><br></div><div>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';</div><div> <br></div><div>Best wishes,</div><div><br></div><div>Jan-Mathijs</div><div><br></div><div><br><div><div><div></div><div class="h5"><div>On Feb 10, 2011, at 11:58 AM, Lucie Charles wrote:</div><br></div></div><blockquote type="cite"> <div><div></div><div class="h5">Hello everyone, <br><br>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).<br> <br>Why is that ? Many of my scripts rely on this option and I wanted to know if there was a good reason for it.<br><br>Thanks, <br><br>Lucie <br><br>New version of ft_timelockgrandaverage (downloaded yesterday), line 159-176<br> <br>%--------------------------------------------<br>% % collect the results<br>%--------------------------------------------<br><br>grandavg = [];<br>grandavg.label = cfg.channel; % cell-array<br> %grandavg.fsample = varargin{1}.fsample; % fsample is obsolete<br> grandavg.time = ResultsTime; % 1 x Nsamples<br><br>%KEEP INDIVIDUAL MEANS?<br>if strcmp(cfg.keepindividual, 'yes')<br><b> grandavg.individual = avgmat; % Nsubj x Nchan x Nsamples<br> grandavg.dimord = 'subj_chan_time';</b><br> else<br><b> grandavg.avg = ResultGrandavg; % Nchan x Nsamples</b><br> grandavg.var = ResultVar; % Nchan x Nsamples<br> grandavg.dimord = 'chan_time';<br> end<br><br>Older version of ft_timelockgrandaverage (april 2010)<br> <br>%--------------------------------------------<br>% % collect the results<br>%--------------------------------------------<br><br>%SWITCH CHANNEL TO LABEL?<br> grandavg.label = cfg.channel; % cell-array<br> grandavg.fsample = varargin{1}.fsample;<br> grandavg.avg = ResultGrandavg; % Nchan x Nsamples<br>grandavg.var = ResultVar; % Nchan x Nsamples<br>grandavg.time = ResultsTime; % 1 x Nsamples<br> <br>%KEEP INDIVIDUAL MEANS?<br> if strcmp(cfg.keepindividual, 'yes')<br> grandavg.individual = avgmat; % Nsubj x Nchan x Nsamples<br> grandavg.dimord = 'subj_chan_time';<br>else<br> grandavg.dimord = 'chan_time';<br> end<br><br clear="all"><br>-- <br>Lucie CHARLES<br> <br>INSERM-CEA Cognitive Neuroimaging unit<br><br>CEA/SAC/DSV/DRM/NeuroSpin<br>Bāt 145, Point Courrier 156<br>F-91191 Gif/Yvette, FRANCE<br>Tel : +33 1 69 08 99 74<br>Fax : +33 1 69 08 79 73<br></div></div> _______________________________________________<br> fieldtrip mailing list<br><a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a><br><a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></blockquote> </div><br><div> <span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; font-size: medium;"><div style="word-wrap: break-word;"> <span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div style="word-wrap: break-word;"> <div>Dr. J.M. (Jan-Mathijs) Schoffelen </div><div>Donders Institute for Brain, Cognition and Behaviour, <br>Centre for Cognitive Neuroimaging,<br>Radboud University Nijmegen, The Netherlands</div><div><a href="mailto:J.Schoffelen@donders.ru.nl" target="_blank">J.Schoffelen@donders.ru.nl</a></div> <div>Telephone: 0031-24-3614793</div></div></span></div></span> </div><br></div></div><br>_______________________________________________<br> fieldtrip mailing list<br> <a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br> <a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br></blockquote></div><br><br clear="all"><br>-- <br>Lucie CHARLES<br><br>INSERM-CEA Cognitive Neuroimaging unit<br> <br>CEA/SAC/DSV/DRM/NeuroSpin<br>Bāt 145, Point Courrier 156<br>F-91191 Gif/Yvette, FRANCE<br>Tel : +33 1 69 08 99 74<br>Fax : +33 1 69 08 79 73<br></blockquote></div><br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Dr. J.M. (Jan-Mathijs) Schoffelen </div><div>Donders Institute for Brain, Cognition and Behaviour, <br>Centre for Cognitive Neuroimaging,<br>Radboud University Nijmegen, The Netherlands</div><div><a href="mailto:J.Schoffelen@donders.ru.nl">J.Schoffelen@donders.ru.nl</a></div><div>Telephone: 0031-24-3614793</div></div></span></div></span> </div><br></div></body></html>