<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Dear Thomas,
<div class=""><br class="">
</div>
<div class="">I would guess that the 3x3 ‘rotation’ part of the affine transformation matrix here describes the direction plane of the sensor in the first two columns (x/y axis), and the normal to this plane in the third column, which is the vector perpendicular
 to the coil. Try and verify whether the cross-product between the first two columns gives the the third.</div>
<div class=""><br class="">
</div>
<div class="">Best wishes,</div>
<div class=""><br class="">
</div>
<div class="">Jan-Mathijs</div>
<div class=""><br class="">
<div>
<blockquote type="cite" class="">
<div class="">On 21 Aug 2018, at 10:24, Thomas Hartmann <<a href="mailto:thomas.hartmann@th-ht.de" class="">thomas.hartmann@th-ht.de</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div text="#000000" bgcolor="#FFFFFF" class="">
<p class="">hi,</p>
<p class="">while diving into the import code for elekta systems, i noticed that coil orientations are imported like this:</p>
<pre class="">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 class="">(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 class="">
</p>
<p class="">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 class="">if i understand everything correctly, coilori is supposed to store a unit vector pointing in the direction of the coil's orientation.</p>
<p class="">so, why is this the third column?</p>
<p class="">thanks a lot in advance!</p>
<p class="">thomas<br class="">
</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>
</div>
_______________________________________________<br class="">
fieldtrip mailing list<br class="">
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" class="">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br class="">
https://doi.org/10.1371/journal.pcbi.1002202<br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>