<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>hi,</p>
    <p>while diving into the import code for elekta systems, i noticed
      that coil orientations are imported like this:</p>
    <pre>t = orig.chs(n).coil_trans;

grad.coilpos(kCoil,:) = t(<span class="pl-c1">1</span>:<span class="pl-c1">3</span>,<span class="pl-c1">4</span>)+<span class="pl-c1">0.0003</span>*t(<span class="pl-c1">1</span>:<span class="pl-c1">3</span>,<span class="pl-c1">3</span>);
grad.coilori(kCoil,:) = t(<span class="pl-c1">1</span>:<span class="pl-c1">3</span>,<span class="pl-c1">3</span>);
</pre>
    <p>(full code is here:
<a class="moz-txt-link-freetext" href="https://github.com/fieldtrip/fieldtrip/blob/master/fileio/private/mne2grad.m#L321">https://github.com/fieldtrip/fieldtrip/blob/master/fileio/private/mne2grad.m#L321</a>)<br>
    </p>
    <p>t (or coil_trans) is a 4x4 matrix, that if i understood it
      correctly, is a 3x3 rotation matrix combined with xyz coordinates
      in the last column.</p>
    <p>if i understand everything correctly, coilori is supposed to
      store a unit vector pointing in the direction of the coil's
      orientation.</p>
    <p>so, why is this the third column?</p>
    <p>thanks a lot in advance!</p>
    <p>thomas<br>
    </p>
    <pre class="moz-signature" cols="72">-- 
Dr. Thomas Hartmann

Centre for Cognitive Neuroscience
FB Psychologie
Universität Salzburg
Hellbrunnerstraße 34/II
5020 Salzburg

Tel: +43 662 8044 5109
Email: <a class="moz-txt-link-abbreviated" href="mailto:thomas.hartmann@th-ht.de">thomas.hartmann@th-ht.de</a>

"I am a brain, Watson. The rest of me is a mere appendix. " (Arthur Conan Doyle)
</pre>
  </body>
</html>