<div dir="ltr"><div>Hi Elene,</div><div><br></div><div>In the code you do not use ft_electroderealign twice (once manually, then automatic). Also, you convert units after realignment. </div><div><br></div><div>For the sake of debugging and clarity, I would:<br></div><div><br></div><ol><li>- figure out and set the units correctly for you headmodel and electrodes</li><li>- convert headmodel and electrodes to same units</li><li>- plot to check</li><li>- use 'interactive' realignment</li><li>- plot to check</li><li>- use 'headmodel' realignment</li><li>- plot to check</li></ol><div><br></div><div>Cheers,</div><div>Stephen<br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, 16 Jan 2019 at 10:35, Elene Beitia Loinaz <<a href="mailto:elene.beitia@alumni.mondragon.edu">elene.beitia@alumni.mondragon.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Stephen,<div><br></div><div>Thank you for your answer. I already try that, but the result that I obtained is not correct either.</div><div><br></div><div>Code:</div><div><br></div><div><div><p style="margin:0px;font-stretch:normal;line-height:normal;font-family:Courier">cfg=[];</p><p style="margin:0px;font-stretch:normal;line-height:normal;font-family:Courier">cfg.method= <span style="color:rgb(178,69,243)">'headshape'</span>;      </p><p style="margin:0px;font-stretch:normal;line-height:normal;font-family:Courier">cfg.headshape=headmodel.bnd(1); <span style="color:rgb(37,153,45)">% this is the skin surface</span></p><p style="margin:0px;font-stretch:normal;line-height:normal;font-family:Courier">elec_realigned =ft_electroderealign(cfg,data1.elec);</p><p style="margin:0px;font-stretch:normal;line-height:normal;font-family:Courier;min-height:12px"> </p><p style="margin:0px;font-stretch:normal;line-height:normal;font-family:Courier;color:rgb(37,153,45)">%Plot the result to see if is correct </p><p style="margin:0px;font-stretch:normal;line-height:normal;font-family:Courier;color:rgb(37,153,45);min-height:12px"> </p><p style="margin:0px;font-stretch:normal;line-height:normal;font-family:Courier">vol = ft_convert_units(vol,<span style="color:rgb(178,69,243)">'mm'</span>);</p><p style="margin:0px;font-stretch:normal;line-height:normal;font-family:Courier;color:rgb(37,153,45)"><span style="color:rgb(34,34,34)">elec_realigned = ft_convert_units(elec_realigned,</span><span style="color:rgb(178,69,243)">'mm'</span><span style="color:rgb(34,34,34)">)</span><br></p><p style="margin:0px;font-stretch:normal;line-height:normal;font-family:Courier;min-height:12px"> </p><p style="margin:0px;font-stretch:normal;line-height:normal;font-family:Courier">figure</p><p style="margin:0px;font-stretch:normal;line-height:normal;font-family:Courier">ft_plot_sens(elec_realigned, <span style="color:rgb(178,69,243)">'style'</span>, <span style="color:rgb(178,69,243)">'b'</span>);</p><p style="margin:0px;font-stretch:normal;line-height:normal;font-family:Courier;min-height:12px"> </p><p style="margin:0px;font-stretch:normal;line-height:normal;font-family:Courier">hold <span style="color:rgb(178,69,243)">on</span></p><p style="margin:0px;font-stretch:normal;line-height:normal;font-family:Courier">ft_plot_vol(vol);</p></div><div><br></div><div><div><img src="cid:ii_jqyyh5gs2" alt="Captura de pantalla 2019-01-16 a las 9.59.14.png" class="gmail-m_-2889052948728612163gmail-CToWUd gmail-m_-2889052948728612163gmail-a6T" style="outline: currentcolor none 0px; margin-right: 0px;" width="286" height="221"></div></div></div><div><br></div><div>Thank you in advance,</div><div><br></div><div>Elene.</div></div>
_______________________________________________<br>
fieldtrip mailing list<br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<a href="https://doi.org/10.1371/journal.pcbi.1002202" rel="noreferrer" target="_blank">https://doi.org/10.1371/journal.pcbi.1002202</a><br>
</blockquote></div>