<div dir="ltr">Hi Jan-Mathijs,<div><br></div><div>Thank you so much for your help. That did seem to fix the bulk of my problem, and I'm now able to view the movie. That being said, I am somewhat surprised by this fix. I had never explicitly written cfg.backproject = 'no' in my previous code, and the description of the ft_prepare_leadfield function claims that the default setting for cfg.backproject is 'yes'. I strangely have to explicitly write cfg.backproject = 'yes' in my forward model script. Is this expected?</div><div><br></div><div>Additionally, although I'm now able to view the movies, I am getting a warning claiming </div><div><br></div><div>Warning could not determine dimord of "noisecov" in:</div><div> time: [1×1020 double]<br>         cfg: [1×1 struct]<br>      inside: [8196×1 logical]<br>         pos: [8196×3 double]<br>         tri: [16384×3 int32]<br>         mom: {8196×1 cell}<br>         pow: [8196×1020 double]<br>    noisecov: {8196×1 cell}<br>         phi: [8196×1 double]<br>         ori: {8196×1 cell}<br>       noise: [8196×1 double]<br></div><div><br></div><div>If any input can be given as to what this might mean, it would also be greatly appreciated. I suspect that this should be the last obstacle I face with this analysis. Thank you!</div><div><br></div><div>Best,</div><div>Philip</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Nov 11, 2020 at 3:43 AM Schoffelen, J.M. (Jan Mathijs) <<a href="mailto:jan.schoffelen@donders.ru.nl">jan.schoffelen@donders.ru.nl</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">



<div style="overflow-wrap: break-word;">
<font size="4">Hi Philip,</font>
<div><font size="4"><br>
</font></div>
<div><font size="4">It could be that your error is caused by the fact that you computed your forward model (ft_prepare_leadfield), using cfg.backproject = ’no’. Consequently, the dipole specific leadfields are of dimensionality Nchan x 2,
 rather than the ’normal’, Nchan x 3. Some of the derived measures obtained from ft_sourceanlaysis (using the Nchan x 2 leadfields) then have dimensions that are 2 x something, or something x 2, rather than the more conventional … x 3. One of these derived
 measures might be the ‘ori’ field, that ft_sourcedescriptives complains about. Long story short, the cfg.backproject = ’no’ option in ft_prepare_leadfield is apparently incompatible with the computation of the ‘phi’ variable in ft_sourcedescriptives. </font></div>
<div><font size="4">The phi variable seems to quantify the (cosine of) the angle between the orientation of the reconstructed source, and the local normal of the cortical sheet. With un-backprojected (and rank reduced) leadfields, the (implicit)
 axes of the coordinate system that spans the plane in which the leadfield lives are incompatible with the implicit axes of the coordinate system that spans the 3D space in which the cortex lives. In other words, the issue is not only an incompatibility between
 the numbers 2 and 3, but it goes a bit deeper than that.</font></div>
<div><font size="4"><br>
</font></div>
<div><font size="4">Assuming that my diagnosis is correct, the short term solution for you would be to re-run the source reconstruction pipeline (including the ft_prepare_leadfield step with cfg.backproject = ‘yes’).</font></div>
<div><font size="4">The somewhat longer term solution would be to implement an error check (dispreferred because it’s more like a band aid), or impose some stricter consistency between the assumed coordinate systems of the different attributes
 of individual dipoles.</font></div>
<div><font size="4"><br>
</font></div>
<div><font size="4">Best wishes,</font></div>
<div><font size="4">Jan-Mathijs</font></div>
<div><br>
</div>
<div><br>
<div><br>
<blockquote type="cite">
<div>On 11 Nov 2020, at 04:12, Philip Cho <<a href="mailto:pnc9@georgetown.edu" target="_blank">pnc9@georgetown.edu</a>> wrote:</div>
<br>
<div>
<div dir="ltr">Hello Fieldtrip Community,
<div><br>
</div>
<div>I'm a new Fieldtrip user, and I'd appreciate any help I can receive. I'm currently working on MEG source reconstruction of an averaged event-related field from a single subject. I believe I have completed most of the steps, and I'm able to view
 my results at a given time using ft_plot_mesh. What I want to do now is view a movie of the activity, but for reasons I do not fully understand, I am having trouble obtaining the descriptive parameters of my results, which I believe is a parameter I must feed
 into ft_sourcemovie.</div>
<div><br>
</div>
<div>In particular, when I run ft_sourcedescriptives, I obtain the following error:</div>
<div><br>
</div>
<div>Error using  * <br>
Incorrect dimensions for matrix multiplication. Check that the number of columns in the first matrix matches the number of rows in the second matrix. To perform elementwise multiplication, use<br>
'.*'.<br>
<br>
Error in ft_sourcedescriptives (line 619)<br>
        source.avg.phi(diplop) = source.avg.ori{diplop}*nrm(diplop,:)';<br>
<br>
Error in mous_sourcemovie (line 7)<br>
sd  = ft_sourcedescriptives(cfg,source_allWords);<br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>It looks like source.avg.ori{diplop}  is a 1x2 array, while nrm(diplop,:)' is a 3x1 array. Please let me know if there is a possible fix to this error. If any additional information is needed, I would also be happy to send it out. Any advice would
 be deeply appreciated. </div>
<div><br>
</div>
<div><br>
</div>
<div>Best,</div>
<div>Philip</div>
</div>
_______________________________________________<br>
fieldtrip mailing list<br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<a href="https://doi.org/10.1371/journal.pcbi.1002202" target="_blank">https://doi.org/10.1371/journal.pcbi.1002202</a><br>
</div>
</blockquote>
</div>
<br>
</div>
</div>

_______________________________________________<br>
fieldtrip mailing list<br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<a href="https://doi.org/10.1371/journal.pcbi.1002202" rel="noreferrer" target="_blank">https://doi.org/10.1371/journal.pcbi.1002202</a><br>
</blockquote></div>