<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;" dir="ltr">
<p>Dear Julian,</p>
<p><br>
</p>
<p>Thanks a lot for your help!</p>
<p>From looking into the function as you suggested, it seems the transformation matrix is actually 4 dimensional, with one extra dimension for scaling. I managed to rotate the sensors but they are still quite far away from the headvolume.<br>
</p>
<p>I tried using <span>ft_sensorrealign</span> (MEG equivalent of <span>ft_electroderealign</span>) but am getting an errormessage
<br>
</p>
<p><br>
</p>
<p><i></p>
<div>Undefined function or variable "pnt".<br>
<br>
Error in channelposition (line 327)<br>
pnt = pnt(sel2, :);</div>
<br>
</i>
<p></p>
<p><i></i><br>
</p>
<div>which I haven't had time to follow up yet. I will post more once I have looked into it.</div>
<p></p>
<p>Anyway, thanks again for the help so far.</p>
<p><br>
</p>
<p>Cheers,</p>
<p>Ulrich<br>
</p>
<p><br>
</p>
<br>
<br>
<div style="color: rgb(0, 0, 0);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" color="#000000" face="Calibri, sans-serif"><b>From:</b> fieldtrip-bounces@science.ru.nl <fieldtrip-bounces@science.ru.nl> on behalf of Julian Keil <julian.keil@gmail.com><br>
<b>Sent:</b> 12 May 2017 08:44<br>
<b>To:</b> FieldTrip discussion list<br>
<b>Subject:</b> Re: [FieldTrip] Rotating sensors using ft_transform_sens</font>
<div> </div>
</div>
<div>Dear Ulrich,
<div><br>
</div>
<div>could you use ft_electroderealign with the interactive-option instead?</div>
<div>Here you have an graphic interface that lets you rotate the electrodes in all directions to match your headshape.</div>
<div>ft_transform_sens is used in this function, so the output should be the same.</div>
<div>Moreover, if you check the code of ft_electroderealign, it can give you a hint to what the transform-matrix should look like: I think it should be a 3x3-matrix with scale, transform and rotate xyz-vectors.</div>
<div><br>
</div>
<div>I hope this helps,</div>
<div><br>
</div>
<div>Julian</div>
<div><br>
</div>
<div><br>
<div>
<div>Am 11.05.2017 um 19:21 schrieb Pomper, Ulrich:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite"><span class="Apple-style-span" style="border-collapse:separate; font-family:Helvetica; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; line-height:normal; orphans:2; text-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px; font-size:medium">
<div dir="ltr">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:rgb(0,0,0); font-family:Calibri,Arial,Helvetica,sans-serif,EmojiFont,'Apple Color Emoji','Segoe UI Emoji',NotoColorEmoji,'Segoe UI Symbol','Android Emoji',EmojiSymbols">
<div>
<div style="margin-top:0px; margin-bottom:0px">Dear Listmembers,</div>
<div style="margin-top:0px; margin-bottom:0px"><br>
</div>
<div style="margin-top:0px; margin-bottom:0px">Could someone please explain how to use ft_transform_sens in order to rotate sensors around a given axis?</div>
<div style="margin-top:0px; margin-bottom:0px">For example, how would the input variable 'transform' need to look like in order to perform a 90 degree rotation around the z-axis?</div>
<div style="margin-top:0px; margin-bottom:0px"><br>
</div>
<div style="margin-top:0px; margin-bottom:0px">Many thanks,</div>
Ulrich</div>
<br>
</div>
_______________________________________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></div>
</span></blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</body>
</html>