<div dir="ltr">Thank you, Julian! Your comments are very helpful. It's working well!<div><br></div><div>For the future reference of other Fieldtrip users, here are my codes of implementing it.</div><div><br></div><div><div><font face="monospace, monospace">sphcoor = [Theta,Phi]'; % combining theta and phi coordinates</font></div><div><font face="monospace, monospace">cartcoor = elp2coor(sphcoor)'; % converting theta/phi coorfinates into xyz</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">data.elec.elecpos = cartcoor;</font></div><div><font face="monospace, monospace">data.elec.chanpos = cartcoor;</font></div><div><font face="monospace, monospace">data.elec.label = ChannelName; % 'ChannelName' is a cell array of channel labels</font></div><div><font face="monospace, monospace">data.elec.unit = 'm';</font></div><div><font face="monospace, monospace">% plot3(data.elec.elecpos(:,1),data.elec.elecpos(:,2),data.elec.elecpos(:,3),'r*') % just check the positions</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">% make a fieldtrip layout file</font></div><div><font face="monospace, monospace">cfg = [];</font></div><div><font face="monospace, monospace">layout = ft_prepare_layout(cfg,data);</font></div><div><font face="monospace, monospace">cfg.layout    = layout;</font></div><div><font face="monospace, monospace">ft_layoutplot(cfg,layout); % check the layout</font></div></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace"><br></font></div>Here is the function converting the theta/phi coordinates to xyz-coordinates you can use in FieldTrip (Written by Stephan Moratti @UCM).<div><br><div><div><font face="monospace, monospace">% Convert electrode positions in polar coordinates (theta, phi like from *.elp-files)</font></div><div><font face="monospace, monospace">% into cartesion coordinates</font></div><div><font face="monospace, monospace">% Electrode positions are assumed to lie on a sphere with radius "radius" (=1 if not specified)</font></div><div><font face="monospace, monospace">% sphcoor(2, number of sensors), cartcoor(3, number of sensors)</font></div><div><font face="monospace, monospace">% Written by Stephan Moratti <a href="mailto:moratti@med.ucm.es">moratti@med.ucm.es</a></font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">function cartcoor = elp2coor(sphcoor, radius); </font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">factor = pi/180;</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">if nargin == 1</font></div><div><font face="monospace, monospace"><span class="gmail-Apple-tab-span" style="white-space:pre">     </span>radius = 1.0;</font></div><div><font face="monospace, monospace">end;</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">[m n] = size(sphcoor);</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">for i=1:n</font></div><div><font face="monospace, monospace"><span class="gmail-Apple-tab-span" style="white-space:pre">      </span>projxy = sin(factor*sphcoor(1,i));</font></div><div><font face="monospace, monospace"><span class="gmail-Apple-tab-span" style="white-space:pre">      </span>cartcoor(3,i) = cos(factor*sphcoor(1,i));</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace"><span class="gmail-Apple-tab-span" style="white-space:pre">       </span>cartcoor(1,i) = projxy*cos(factor*sphcoor(2,i));</font></div><div><font face="monospace, monospace"><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>cartcoor(2,i) = projxy*sin(factor*sphcoor(2,i));</font></div><div><font face="monospace, monospace">end;</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">cartcoor = radius*cartcoor;</font></div></div><br><br>Best,<br>Andrew</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Feb 25, 2017 at 2:31 PM, Julian Keil <span dir="ltr"><<a href="mailto:julian.keil@gmail.com" target="_blank">julian.keil@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hi Andrew,<div><br></div><div>I attached you a function to convert the theta/phi coordinates to xyz-coordinates you can use in FieldTrip (Written by Stephan Moratti @UCM).</div><div>To actually use the result, you need to build an electrode structure, so do something like this:</div><div><br></div><div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Menlo">cap=importdata(<span style="color:#2832cf">'128_channel_<wbr>easycap.elp'</span>); % Import the Vendor-Provided <span style="color:#2832cf">3</span>d Positions</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Menlo;min-height:13px"><br></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Menlo">%% Step <span style="color:#2832cf">2.1</span>. Make an electrode file</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Menlo;min-height:13px"><br></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Menlo">elec.pnt=elp2coor(cap.data<span style="color:#2832cf">',<wbr>100)'</span>;</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Menlo">elec.label=cap.textdata;</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Menlo;min-height:13px"><br></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Menlo">%% Check the positiosn on the head surface. They don<span style="color:#2832cf">'t look good, do they?</span></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Menlo;color:rgb(40,50,207);min-height:13px"><br></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Menlo;color:rgb(40,50,207)"> figure</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Menlo;color:rgb(40,50,207)">  triplot(vol.bnd(1).pnt, vol.bnd(1).tri,  [], '<span style="color:#000000">edges</span>');</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Menlo;color:rgb(40,50,207)"> hold</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Menlo;color:rgb(40,50,207)"> plot3(elec.pnt(:,1),elec.pnt(<wbr>:,2),elec.pnt(:,3),'<span style="color:#000000">r*</span>')</div><p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo;color:#2832cf;min-height:13.0px"> <br class="m_6583135096501091101webkit-block-placeholder"></p><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Menlo;color:rgb(40,50,207)">%% Step 3 Move the electrodes to match the head</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Menlo;color:rgb(40,50,207);min-height:13px"><br></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Menlo;color:rgb(40,50,207)">  cfg=[];</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Menlo;color:rgb(40,50,207)">  cfg.method='<span style="color:#000000">interactive</span>';</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Menlo;color:rgb(40,50,207)">  cfg.elec=elec;</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Menlo;color:rgb(40,50,207)">  cfg.headshape=vol.bnd(1);</div><p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo;color:#2832cf;min-height:13.0px">  <br class="m_6583135096501091101webkit-block-placeholder"></p><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Menlo;color:rgb(40,50,207)">  elec_new=ft_electroderealign(<wbr>cfg);</div><p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo;color:#2832cf;min-height:13.0px">  </p></div><div>Good luck,</div><div><br></div><div>Julian</div><div><br></div><div><br></div><div></div></div><br><div style="word-wrap:break-word"><div><br><div>
<span class="m_-4372630880714739307Apple-style-span" style="border-collapse:separate;color:rgb(0,0,0);font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><span class="m_-4372630880714739307Apple-style-span" style="border-collapse:separate;color:rgb(0,0,0);font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><div style="word-wrap:break-word"><div><div style="word-wrap:break-word;font-size:12px">********************</div><div style="word-wrap:break-word"><b>Dr. Julian Keil</b></div><div style="word-wrap:break-word"><b><br></b></div><div><div>AG Multisensorische Integration<br>Klinik für Psychiatrie und Psychotherapie<br>der Charité im St. Hedwig-Krankenhaus<br>Große Hamburger Straße 5-11, Haus 2<br>10115 Berlin</div><div><br>Telefon: <a href="tel:+49%2030%2023111879" value="+493023111879" target="_blank">+49-30-2311-1879</a><br>Fax:        <a href="tel:+49%2030%2023112209" value="+493023112209" target="_blank">+49-30-2311-2209</a> </div><div><a href="http://www.multisensorymind.com" target="_blank">www.multisensorymind.com</a></div></div></div><div><br></div></div></span></span><br class="m_-4372630880714739307Apple-interchange-newline">
</div>
<br><div><div>Am 25.02.2017 um 16:39 schrieb Andrew Chang:</div><br class="m_-4372630880714739307Apple-interchange-newline"><blockquote type="cite"><div dir="ltr"><div>Dear FieldTrip users,</div><div><br></div><div>I am wondering whether anyone would like to share the Fieldtrip layout file of the "<b>actiCap 96Ch Standard 2</b>" EEG cap with me. I have checked around the websites of Fieldtrip and Easycap, but failed to find anything useful. So far I only got it's top-view map and it's Theta/Phi Coordinates (see the attached PDFs in the links below). </div><div><a href="https://www.dropbox.com/s/wlshxqb93tn4duz/actiCAP-96-channel-Standard-2.pdf?dl=0" target="_blank">https://www.dropbox.com/s/<wbr>wlshxqb93tn4duz/actiCAP-96-<wbr>channel-Standard-2.pdf?dl=0</a><br></div><div><a href="https://www.dropbox.com/s/6bva7az6ydc6hvh/actiCap-96Ch-Standard%202%20Theta_Phi_CAP.pdf?dl=0" target="_blank">https://www.dropbox.com/s/<wbr>6bva7az6ydc6hvh/actiCap-96Ch-<wbr>Standard%202%20Theta_Phi_CAP.<wbr>pdf?dl=0</a><br></div><div><br></div><div>It would be very appreciated if anyone can share the Fieldtrip layout file with me, or teach me how to create a layout in Fieldtrip from Theta/Phi Coordinates.</div><div>Thank you all in advance!</div><div><br></div><div>Sincerely,</div><div>Andrew</div><div class="gmail_extra"><br><div class="gmail_quote"><br></div>-- <br><div class="m_-4372630880714739307gmail_signature"><div dir="ltr">Andrew Chang, Ph.D. Candidate<br>Vanier Canada Graduate Scholar<br><a href="http://changa5.wordpress.com/" target="_blank">http://changa5.wordpress.com/</a><br><br>Auditory Development Lab<br>Department of Psychology, Neuroscience & Behaviour<br>McMaster University</div></div>
</div></div>
______________________________<wbr>_________________<br>fieldtrip mailing list<br><a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a><br><a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">https://mailman.science.ru.nl/<wbr>mailman/listinfo/fieldtrip</a></blockquote></div><br></div></div><br>______________________________<wbr>_________________<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" rel="noreferrer" target="_blank">https://mailman.science.ru.nl/<wbr>mailman/listinfo/fieldtrip</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Andrew Chang, Ph.D. Candidate<br>Vanier Canada Graduate Scholar<br><a href="http://changa5.wordpress.com/" target="_blank">http://changa5.wordpress.com/</a><br><br>Auditory Development Lab<br>Department of Psychology, Neuroscience & Behaviour<br>McMaster University</div></div>
</div>