<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hi all,<br>
    <br>
    From the previous email it seems that I'm doing something wrong
    then. I have previously used the MNI-aligned subject grid (warped
    template) for the positions, hence I didn't encounter any problem.
    However, this seems to be wrong, as Jorn suggested. The question is
    the following:<br>
    <br>
    The sourcediff.avg.pow is produced using the warped MNI template,
    therefore the grid positions and indexes will be different from the
    subject-specific MRI. Specifically in my case, the warped template
    has 11000 x 3 pos, whereas the subject-specific has 2652 x 3. <br>
    My question is, when I therefore index the maxpos using:<br>
    <br>
    [maxval, maxind] = max(sourcediff.avg.pow), my index is 3171, which
    exceeds the matrix dimensions of the subject-specific MRI (2652). <br>
    <br>
    Which step am I missing?<br>
    <br>
    Thanks for your help in advance,<br>
    Elisa<br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <div class="moz-cite-prefix">On 07/08/2013 13:52, "Jörn M. Horschig"
      wrote:<br>
    </div>
    <blockquote cite="mid:52024310.1020109@donders.ru.nl" type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      <div class="moz-cite-prefix">Dear Charidimos,<br>
        <br>
        thanks very much for pointing to this, it is indeed an error in
        the appendix of the tutorial. cfg.grid.pos should be based on
        the subject-specific MRI or sourcemodel. So, correctly it should
        say that you need to load sourcemodel.mat (i.e. subject specific
        grid) and then use sourcemodel.pos(maxpowindx, :) <br>
        The rationale in principle is that the warped grid has the same
        size and is indexed the same as the original grid; that is why
        you can use the index variable obtained from the MNI-warped
        source reconstructed data. The virtual channel reconstruction
        should however still be done in whatever coordinate system the
        subject's anatomical data is in. I will update the appendix
        accordingly.<br>
        <br>
        Best,<br>
        Jörn<br>
        <br>
        On 8/6/2013 8:24 PM, Charidimos Tzagarakis wrote:<br>
      </div>
      <blockquote
cite="mid:CAFN2X+fdvTW8jkx1EPS8C+J_FGRTQgTtYL38aYw7Gv6BbLtsxg@mail.gmail.com"
        type="cite">Hi there, <br>
        I have a question regarding virtual electrodes: How can I double
        check that the MNI coordinates that I enter are correctly
        interpreted?<br>
        More specifically:<br>
        I have followed the the extended beamforming tutorial in the
        "Appendix" and have been able to transpose it to my data (I have
        4D/BTi MEG files and Dicom mri volumes).The part I am not
        certain about is the call to the LCMV beamformer.<br>
        Here it is in my case ( I just want to get the voxel were the
        power is max in the previous analysis):<br>
        cfg              = [];<br>
        cfg.method       = 'lcmv';<br>
        cfg.vol          = volfcm;<br>
        cfg.grid.pos     = source_diff.pos(maxpowindx, :);<br>
        cfg.grid.inside  = 1:size(cfg.grid.pos, 1);<br>
        cfg.grid.outside = [];<br>
        cfg.grad=senscm<br>
        source_idx       = ft_sourceanalysis(cfg, tlock);<br>
        My headmodel does not include MEG channel information so I need
        to also define the cfg.grad parameter. What I don't understand
        is how cfg.grid.pos (which is in MNI coordinates as per the
        previous part of the tutorial) can be correctly applied to the
        coordinates of the headmodel and the channels since these 2 are
        not in MNI coordinates (in my case they are in 4d/Bti
        coordinates and rescaled to cm).In the previous part of the
        tutorial this is (if I understand correctly) accomplished
        because the leadfield used when calling ft_sourceanalysis was
        created using and MNI-warped template. I don't see where the
        equivalent part is when estimating the virtual electrode though.<br>
        Any advice you may have would be much appreciated.<br>
        Best,<br>
        Haris<br>
        <br>
        <br>
        Charidimos [Haris] Tzagarakis MD, PhD, MRCPsych <br>
        University of Minnesota Dept of Neuroscience and Brain Sciences
        Center <br>
        <br>
        <br>
        <fieldset class="mimeAttachmentHeader"></fieldset>
        <br>
        <pre wrap="">_______________________________________________
fieldtrip mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></pre>
      </blockquote>
      <br>
      <br>
      <pre class="moz-signature" cols="72">-- 
Jörn M. Horschig
PhD Student
Donders Institute for Brain, Cognition and Behaviour 
Centre for Cognitive Neuroimaging
Radboud University Nijmegen 
Neuronal Oscillations Group
FieldTrip Development Team

P.O. Box 9101
NL-6500 HB Nijmegen
The Netherlands

Contact:
E-Mail: <a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:jm.horschig@donders.ru.nl">jm.horschig@donders.ru.nl</a>
Tel:    +31-(0)24-36-68493
Web: <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.ru.nl/donders">http://www.ru.nl/donders</a>

Visiting address:
Trigon, room 2.30
Kapittelweg 29
NL-6525 EN Nijmegen
The Netherlands</pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
fieldtrip mailing list
<a class="moz-txt-link-abbreviated" href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a>
<a class="moz-txt-link-freetext" href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></pre>
    </blockquote>
    <br>
  </body>
</html>