<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Dear Jorn,<br>
    <br>
    ah, I apologise for not writing a complete email! The good news is
    that I've done things correctly so far,  as I do have the same
    number of grid points in both the subject-specific and template, as
    expected :) I gave you the wrong indices because I thought that in
    your previous email you referred to the MRI rather than the
    sourcemodel. My bad. Sorry for the misunderstanding and thanks a lot
    for explaining this again!<br>
    <br>
    Best,<br>
    Elisa<br>
    <br>
    <br>
    <div class="moz-cite-prefix">On 08/08/2013 12:45, "Jörn M. Horschig"
      wrote:<br>
    </div>
    <blockquote cite="mid:520384C5.80703@donders.ru.nl" type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      <div class="moz-cite-prefix">Dear Elisa,<br>
        <br>
        hard to tell, because you are not telling us exactly what you
        are doing :) <br>
        The idea in the extended beamforming tutorial is that you first
        create an MNI template sourcemodel (or grid). Subsequently, you
        use exactly this grid and spatially transform it such that it
        fits to the subject-specific brain, based on the MRI. After
        following these steps, by definition, the number of grid points
        in the subject-specific grid and the MNI grid are the same -
        just the place where the grid points end up did change.
        (Otherwise, it would also not be possible to replace the .pos
        field from the source-reconstructed data by the template grid,
        as being done in the plotting part of the tutorial). The problem
        in the tutorial was exactly this replacement of the position
        description (which iself can be a perfectly fine step as e.g.
        earlier in the tutorial). Since we provide a sourcemodel based
        on the subject's mri, we need to specify the position based on
        that mri/sourcemodel and not based on the MNI template.<br>
        <br>
        You, obviously, do not have the same number of grid points for
        the subject-specific sourcemodel as in the template sourcemodel.
        I cannot guarantee that what you did is correct, but at least I
        can tell you that what you did is not affects by this - else you
        would have had the same number of elements for both
        sourcemodels. I cross my fingers that you're doing the right
        thing :)<br>
        <br>
        Best,<br>
        Jörn<br>
        <br>
        On 8/8/2013 12:23 PM, Elisa Carrus wrote:<br>
      </div>
      <blockquote cite="mid:520371B9.8060101@csl.psychol.cam.ac.uk"
        type="cite">
        <meta content="text/html; charset=ISO-8859-1"
          http-equiv="Content-Type">
        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 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>
        <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>