<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Dear Nikolai,</div><div><br></div>In ft_sourceplot there is the possibility of projecting grid data to surface data. However, I am not sure if the other way round is implemented in field trip.<div><br></div><div>With respect to the other (maybe less accurate solution) of providing a neighbor matrix of the vertices of your brain surface:</div><div><br></div><div>if you do " channeigbststructmat = your_neighbor_matrix" in clusterstat.m should work.</div><div><br></div><div>Best,</div><div><br></div><div>Stephan</div><div><br></div><div><div><br></div><div><br><div apple-content-edited="true">
<div><div>________________________________________________________</div><div>Stephan Moratti, PhD<br><br></div><div>see also: <a href="http://web.me.com/smoratti/">http://web.me.com/smoratti/</a><br><br></div><div>Universidad Complutense de Madrid</div><div>Facultad de Psicología</div><div>Departamento de Psicología Básica I</div><div>Campus de Somosaguas</div><div>28223 Pozuelo de Alarcón (Madrid)</div><div>Spain</div><div><br></div><div>and</div><div><br></div><div>Center for Biomedical Technology</div><div>Laboratory for Cognitive and Computational Neuroscience</div><div>Parque Científico y Tecnológico de la Universidad Politecnica de Madrid<br>Campus Montegancedo</div><div>28223 Pozuelo de Alarcón (Madrid)</div><div>Spain<br><br><br>email: <a href="mailto:smoratti@psi.ucm.es">smoratti@psi.ucm.es</a><br>Tel.: +34 679219982</div></div>
</div>
<br><div><div>El 13/06/2013, a las 12:04, Nicolai Mersebak escribió:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Thanks to all of you for your comments and ideas - they are very helpful! </div><div><br></div><div>I ( off course :) ) have some follow up questions. </div><div><br></div><div>I have created an ERP structure for my MNE source, so the only think which I need and that is not straight forward is the neighbour structure. </div><div><br></div><div>I am using the standard bem template (fieldtrip-20130124/template/headmodel/standard_bem.mat) as a head model and use the following code to get a grid for all subjects as I don't have any subject specific information regarding the anatomy. </div><div><br></div><div><div style="margin: 0px; font-size: 10px; font-family: Courier; ">cfg = [];</div><div style="margin: 0px; font-size: 10px; font-family: Courier; ">cfg.grid.xgrid = -100:10:100;</div><div style="margin: 0px; font-size: 10px; font-family: Courier; ">cfg.grid.ygrid = -100:10:100;</div><div style="margin: 0px; font-size: 10px; font-family: Courier; ">cfg.grid.zgrid = -100:10:100;</div><div style="margin: 0px; font-size: 10px; font-family: Courier; ">cfg.grid.tight = <span style="color: #b245f3">'yes'</span>;</div><div style="margin: 0px; font-size: 10px; font-family: Courier; ">cfg.grid.unit = hdm.unit; <span style="color: #25992d">% unit: mm</span></div><div style="margin: 0px; font-size: 10px; font-family: Courier; ">cfg.vol = hdm;</div><div style="margin: 0px; font-size: 10px; font-family: Courier; ">grid = ft_prepare_sourcemodel(cfg);</div></div><div><br></div><div><br></div><div>@Jan-Mathijs and Stephan: I guess making a subject specific grid based on a warped template requires anatomic information for each subject, e.g. a MRI image like this tutorial shows:</div><div><a href="http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s%5B">http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s%5B</a></div><div><br></div><div>The final grid output in the tutorial - does it have this 3D grid which can be used as a neighbour structure ? </div><div><br></div><div>I am not sure how to go from my cortical sheet [vertices x coordinates(x,y,z)] to a 3D grid, which I can use as a neighbour structure ?</div><div> </div><div>A second thing I would like to know is, if any of you have tried to use an atlas (e.g ALL template atlas) where the regions now are channels in the permutation test? Going from source points to atlas regions can be done through ft_sourcestatistics, but I am still interested in keeping the temporal dimension. The reason to use atlas regions instead of source points is to decrease the computation time. </div><div><br></div><div>Best,</div><div><br></div><div>Nicolai</div><div><br></div><br><div><div>Den 12/06/2013 kl. 18.58 skrev "<a href="mailto:smoratti@psi.ucm.es">smoratti@psi.ucm.es</a>" <<a href="mailto:smoratti@psi.ucm.es">smoratti@psi.ucm.es</a>>:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div>I think Jan.Mathijs alternative suggestion is quite attractive. With the neighbors on a cortical sheet I also had the problems that sometimes the vertices do not have the same distance and then clustering may be biased to smaller or bigger clusters as the number of neighbors does not guarantee same cluster sizes. With the interpolation onto a 3D grid, you won't have that problem.<div><br></div><div>best,</div><div><br></div><div>Stephan</div><div><br></div><div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px; "><div>________________________________________________________</div><div>Stephan Moratti, PhD<br><br></div><div>see also: <a href="http://web.me.com/smoratti/">http://web.me.com/smoratti/</a><br><br></div><div>Universidad Complutense de Madrid</div><div>Facultad de Psicología</div><div>Departamento de Psicología Básica I</div><div>Campus de Somosaguas</div><div>28223 Pozuelo de Alarcón (Madrid)</div><div>Spain</div><div><br></div><div>and</div><div><br></div><div>Center for Biomedical Technology</div><div>Laboratory for Cognitive and Computational Neuroscience</div><div>Parque Científico y Tecnológico de la Universidad Politecnica de Madrid<br>Campus Montegancedo</div><div>28223 Pozuelo de Alarcón (Madrid)</div><div>Spain<br><br><br>email: <a href="mailto:smoratti@psi.ucm.es">smoratti@psi.ucm.es</a><br>Tel.: +34 679219982</div></span>
</div>
<br><div><div>El 12/06/2013, a las 18:00, jan-mathijs schoffelen escribió:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">An alternative would be to interpolate the cortical sheet to a 3D grid (where the grid is defined for each subject based on a warped template grid defined in a standard space), and then do clustering using a regular 3D spatial neighbourhood structure. The rationale being that two vertices on the sheet may appear as disconnected (e.g. being on two sides of a sulcus) whereas, given the poor spatial resolution, they belong to the same spatial blob.<div><br></div><div>Best,</div><div>Jan-Mathijs</div><div><br><div><div>On Jun 12, 2013, at 5:44 PM, <a href="mailto:smoratti@psi.ucm.es">smoratti@psi.ucm.es</a> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Dear Nicolai,<div><br></div><div>Indeed I have used ft_timelockstatistics for minimum norm source data. The trick is to put the source level data into a ERF structure. Determining the neighbors of a source surface with vertices is not trivial. However I used tess_vertconn.m from the BrainStorm toolbox to get the connectivity matrix that tells you who is a neighbor. This you can feed into timelockstats.</div><div><br></div><div>Hope that helps,</div><div><br></div><div>Stephan</div><div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-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>________________________________________________________</div><div>Stephan Moratti, PhD<br><br></div><div>see also: <a href="http://web.me.com/smoratti/">http://web.me.com/smoratti/</a><br><br></div><div>Universidad Complutense de Madrid</div><div>Facultad de Psicología</div><div>Departamento de Psicología Básica I</div><div>Campus de Somosaguas</div><div>28223 Pozuelo de Alarcón (Madrid)</div><div>Spain</div><div><br></div><div>and</div><div><br></div><div>Center for Biomedical Technology</div><div>Laboratory for Cognitive and Computational Neuroscience</div><div>Parque Científico y Tecnológico de la Universidad Politecnica de Madrid<br>Campus Montegancedo</div><div>28223 Pozuelo de Alarcón (Madrid)</div><div>Spain<br><br><br>email: <a href="mailto:smoratti@psi.ucm.es">smoratti@psi.ucm.es</a><br>Tel.: +34 679219982</div></span>
</div>
<br><div><div>El 12/06/2013, a las 15:44, Nicolai Mersebak escribió:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">Dear all,<div><br></div><div>I have a question concerning <span style="">the usage of ft_sourcegrandaverage and ft_sourcestatistics. </span></div><div><font><br></font></div><div>
<font>After using ft_sourceanalysis (method: MNE), I get spatio-temporal source reconstructed data in source.avg.pow (4050 x 897): 4050 sources and 897 time points. </font></div><div><font><br>
</font></div><div><font>Now I would like to use the cluster-based permutation test on my source reconstructed data. However it seems like ft_sourcegrandaverage and</font><span style=""> ft_sourcestatistics don't support source level time courses. E.g when I am using </span><span style="">ft_sourcegrandaverage I am getting the following error:</span></div>
<div><font><br></font></div><div><div>Error in ft_sourcegrandaverage (line 158)</div><div> dat(:,i) = tmp(:);</div><div><br></div><div style="">Looking into the code:</div><div style=""><br></div><div style=""><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 10px; font-family: Courier; ">
<span style="color:rgb(4,51,255)">for</span> i=1:Nsubject</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 10px; font-family: Courier; "> tmp = getsubfield(varargin{i}, parameterselection(cfg.parameter, varargin{i}));</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 10px; font-family: Courier; "> dat(:,i) = tmp(:);</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 10px; font-family: Courier; "> tmp = getsubfield(varargin{i}, <span style="color:rgb(178,69,243)">'inside'</span>);</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 10px; font-family: Courier; "> inside(tmp,i) = 1;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 10px; font-family: Courier; color: rgb(4, 51, 255); "><span style=""> </span>end</div><div><br></div></div><div style="">I see that "tmp" are getting the structure [N_sources x timepoints] from source.avg.pow for one subject, where "dat" requires the structure [N_sources x 1]. <br>
</div><div style=""><br></div><div style="">I seached the mailing list for similar issues and found this thread:</div><div style=""><br></div><div style=""><a href="http://mailman.science.ru.nl/pipermail/fieldtrip/2010-September/003122.html">http://mailman.science.ru.nl/pipermail/fieldtrip/2010-September/003122.html</a><br>
</div><div style=""><br></div><div style="">Since I am interested in using the temporal dimension in my statistics, I would like to know if it is still not possible to use spatio-temporal source reconstructed data in ft_sourcestatistics and ft_sourcegrandaverage ?</div>
<div style=""><br></div><div style="">Or if any have succeeded in using the cluster-based permutation test on source level also including the temporal dimension ? </div><div style=""><br></div><div style="">Alternative I was thinking that I might could use ft_timelockstatistics, where I substituted the channels with sources, e.g instead of having 64 channels, I would now have 4050 "channels". </div>
<div style="">If so I need to calculate a label structure and an appropriate neighbor structure, which I guess is possible as I have all the 3D coordinates for each source, e.g in leadfield.pos ?</div><div style="">I know this is a work around solution, but have anyone tried or have any experience using such an approach ? </div>
<div style=""><br></div><div style="">Best,</div><div style=""><br></div><div style="">Nicolai</div><div><br></div></div></div>
_______________________________________________<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">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></blockquote></div><br></div></div>_______________________________________________<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">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-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; "><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-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; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-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; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-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; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-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; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-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; font-family: Helvetica; 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; 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; font-family: Helvetica; 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; 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; 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>Jan-Mathijs Schoffelen, MD PhD </div><div><br></div><div>Donders Institute for Brain, Cognition and Behaviour, <br>Centre for Cognitive Neuroimaging,<br>Radboud University Nijmegen, The Netherlands</div><div><br></div><div>Max Planck Institute for Psycholinguistics,</div><div>Nijmegen, The Netherlands</div><div><br></div><div><a href="mailto:J.Schoffelen@donders.ru.nl">J.Schoffelen@donders.ru.nl</a></div><div>Telephone: +31-24-3614793</div><div><br></div><div><a href="http://www.hettaligebrein.nl/">http://www.hettaligebrein.nl</a></div></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></span>
</div>
<br></div></div>_______________________________________________<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">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></blockquote></div><br></div></div>_______________________________________________<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">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></blockquote></div><br></div>_______________________________________________<br>fieldtrip mailing list<br><a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</blockquote></div><br></div></div></body></html>