<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
Hi Giuseppe, 
<div class=""><br class="">
</div>
<div class="">OK, good that it works for you this way. I assume that the data that you sent along has been tortured by you, so that the electrodes conform to ‘RAS’ coordinates?</div>
<div class=""><br class="">
</div>
<div class="">Long story short, I have just recently pushed some small changes to the FT-code (currently only present in our development version of the repository -> I hope that these changes will become available in the latest release over the weekend),  that
 should make the automatic layout creation a bit more robust. Specifically, using data that is ‘imported’ from EEGlab.</div>
<div class=""><br class="">
</div>
<div class="">For now, you could achieve the same thing by adding a field to the data structure after you imported it (note: once the newer release becomes available, this should not be needed anymore):</div>
<div class=""><br class="">
</div>
<div class="">data.elec.coordsys = ‘ctf’; % note that this assumes that the EEG.chaninfo.nosedir = ‘+X’</div>
<div class=""><br class="">
</div>
<div class="">Then you can check whether all is fine with:</div>
<div class=""><br class="">
</div>
<div class="">cfg = [];</div>
<div class="">cfg.elec = data.elec;</div>
<div class="">lay = ft_prepare_layout(cfg);</div>
<div class=""><br class="">
</div>
<div class="">figure;ft_plot_layou(lay);</div>
<div class=""><br class="">
</div>
<div class="">Best wishes,</div>
<div class=""><br class="">
</div>
<div class="">JM</div>
<div class=""><br class="">
</div>
<div class="">PS: I must say that I would not be very happy with the layouts created like this, for the EGI cap that you seem to have used. The reason is that all ‘E<number>’ channels end up within the circle of the head, and thus gives a distortion and a false
 impression of the topogaphy relative to the head. Perhaps it might be worth the effort to create (or adjust an existing) layout, that looks a bit like this:</div>
<div class=""><br class="">
</div>
<div class=""><a href="https://www.fieldtriptoolbox.org/assets/img/template/layout/GSN-HydroCel-129.png" class="">https://www.fieldtriptoolbox.org/assets/img/template/layout/GSN-HydroCel-129.png</a></div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 19 Aug 2022, at 08:39, Zito Giuseppe Angelo <<a href="mailto:giuseppeangelo.zito@hest.ethz.ch" class="">giuseppeangelo.zito@hest.ethz.ch</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="WordSection1" style="page: WordSection1; caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;" class="">Hi Jan-Mathijs,<o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;" class=""><o:p class=""> </o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;" class="">Thank you for your kind reply.<o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;" class="">I could not actually figure it out myself, but I forced the template to rotate by modifying elec.chanpos.<o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;" class="">Here is the code I used, and I also attach the files from one subject:<o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;" class=""><o:p class=""> </o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class="">fileName = [folderPath participants{i}<span class="Apple-converted-space"> </span></span><span style="font-size: 10pt; font-family: "Courier New"; color: rgb(170, 4, 249);" class="">'\'</span><span style="font-size: 10pt; font-family: "Courier New";" class=""><span class="Apple-converted-space"> </span>participants{i}<span class="Apple-converted-space"> </span></span><span style="font-size: 10pt; font-family: "Courier New"; color: rgb(170, 4, 249);" class="">'_'</span><span style="font-size: 10pt; font-family: "Courier New";" class=""><span class="Apple-converted-space"> </span>conditions{j}<span class="Apple-converted-space"> </span></span><span style="font-size: 10pt; font-family: "Courier New"; color: rgb(170, 4, 249);" class="">'.set'</span><span style="font-size: 10pt; font-family: "Courier New";" class="">];</span><span style="font-size: 12pt; font-family: "Courier New";" class=""><o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class="">       </span><span style="font-size: 12pt; font-family: "Courier New";" class=""><o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class="">cfg = [];</span><span style="font-size: 12pt; font-family: "Courier New";" class=""><o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class="">cfg.dataset = fileName;</span><span style="font-size: 12pt; font-family: "Courier New";" class=""><o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class=""></span><span style="font-size: 12pt; font-family: "Courier New";" class=""><o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New"; color: rgb(2, 128, 9);" class="">% Load the data from EEGlab to FieldTrip</span><span style="font-size: 12pt; font-family: "Courier New";" class=""><o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class="">data{i,j} = ft_preprocessing(cfg);</span><span style="font-size: 12pt; font-family: "Courier New";" class=""><o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class="">       </span><span style="font-size: 12pt; font-family: "Courier New";" class=""><o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New"; color: rgb(2, 128, 9);" class="">% Set parameters</span><span style="font-size: 12pt; font-family: "Courier New";" class=""><o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class="">cfg.method      =<span class="Apple-converted-space"> </span></span><span style="font-size: 10pt; font-family: "Courier New"; color: rgb(170, 4, 249);" class="">'mtmfft'</span><span style="font-size: 10pt; font-family: "Courier New";" class="">;</span><span style="font-size: 12pt; font-family: "Courier New";" class=""><o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class="">cfg.output      =<span class="Apple-converted-space"> </span></span><span style="font-size: 10pt; font-family: "Courier New"; color: rgb(170, 4, 249);" class="">'pow'</span><span style="font-size: 10pt; font-family: "Courier New";" class="">;</span><span style="font-size: 12pt; font-family: "Courier New";" class=""><o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class="">cfg.channel     =<span class="Apple-converted-space"> </span></span><span style="font-size: 10pt; font-family: "Courier New"; color: rgb(170, 4, 249);" class="">'all'</span><span style="font-size: 10pt; font-family: "Courier New";" class="">;</span><span style="font-size: 12pt; font-family: "Courier New";" class=""><o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class="">cfg.trials      =<span class="Apple-converted-space"> </span></span><span style="font-size: 10pt; font-family: "Courier New"; color: rgb(170, 4, 249);" class="">'all'</span><span style="font-size: 10pt; font-family: "Courier New";" class="">;</span><span style="font-size: 12pt; font-family: "Courier New";" class=""><o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class="">cfg.keeptrials  =<span class="Apple-converted-space"> </span></span><span style="font-size: 10pt; font-family: "Courier New"; color: rgb(170, 4, 249);" class="">'yes'</span><span style="font-size: 10pt; font-family: "Courier New";" class="">;    <span class="Apple-converted-space"> </span></span><span style="font-size: 10pt; font-family: "Courier New"; color: rgb(2, 128, 9);" class="">%
 no=compute the average power across the trials, otherwise 'yes'</span><span style="font-size: 12pt; font-family: "Courier New";" class=""><o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class="">cfg.pad         =<span class="Apple-converted-space"> </span></span><span style="font-size: 10pt; font-family: "Courier New"; color: rgb(170, 4, 249);" class="">'nextpow2'</span><span style="font-size: 10pt; font-family: "Courier New";" class="">;</span><span style="font-size: 12pt; font-family: "Courier New";" class=""><o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class="">cfg.taper       =<span class="Apple-converted-space"> </span></span><span style="font-size: 10pt; font-family: "Courier New"; color: rgb(170, 4, 249);" class="">'dpss'</span><span style="font-size: 10pt; font-family: "Courier New";" class="">;</span><span style="font-size: 12pt; font-family: "Courier New";" class=""><o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class="">cfg.tapsmofrq   = 2;</span><span style="font-size: 12pt; font-family: "Courier New";" class=""><o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class="">cfg.foi         = 4:35;<span class="Apple-converted-space"> </span></span><span style="font-size: 10pt; font-family: "Courier New"; color: rgb(2, 128, 9);" class="">% frequency band of interest
 with stepsize</span><span style="font-size: 12pt; font-family: "Courier New";" class=""><o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class="">       </span><span style="font-size: 12pt; font-family: "Courier New";" class=""><o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New"; color: rgb(2, 128, 9);" class="">% Extract the frequencies</span><span style="font-size: 12pt; font-family: "Courier New";" class=""><o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class="">freq{i,j} = ft_freqanalysis(cfg, data{i,j});</span><span style="font-size: 12pt; font-family: "Courier New";" class=""><o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class="">       </span><span style="font-size: 12pt; font-family: "Courier New";" class=""><o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New"; color: rgb(2, 128, 9);" class="">% Invert X and Y electrode position due to a mismatch between fieldtrip and EEGlab</span><span style="font-size: 12pt; font-family: "Courier New";" class=""><o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class="">newCoordinates = [2 1 3];</span><span style="font-size: 12pt; font-family: "Courier New";" class=""><o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class="">freq{i,j}.elec.chanpos = freq{i,j}.elec.chanpos(:,newCoordinates);</span><span style="font-size: 12pt; font-family: "Courier New";" class=""><o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class="">freq{i,j}.elec.chanpos(:,1) = -freq{i,j}.elec.chanpos(:,1);</span><span style="font-size: 12pt; font-family: "Courier New";" class=""><o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class="">freq{i,j}.elec.elecpos = freq{i,j}.elec.elecpos(:,newCoordinates);</span><span style="font-size: 12pt; font-family: "Courier New";" class=""><o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class="">freq{i,j}.elec.elecpos(:,1) = -freq{i,j}.elec.elecpos(:,1);</span><span style="font-size: 12pt; font-family: "Courier New";" class=""><o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 12pt; font-family: "Courier New";" class=""><o:p class=""> </o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;" class="">If you know a more elegant way to make it work, I would be happy to use it.<o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;" class=""><o:p class=""> </o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;" class="">Thank you once again for the help,<o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;" class="">Giuseppe<o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: Arial, sans-serif;" class=""><o:p class=""> </o:p></span></div>
<div class="">
<div class="">
<div class="">
<div class="MsoNormal" style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif; background-color: white;">
<span lang="DE-CH" style="font-size: 10pt; font-family: Arial, sans-serif;" class="">
<hr size="2" width="100%" align="left" class="">
</span></div>
</div>
</div>
</div>
<p class="MsoNormal" style="margin: 0cm 0cm 2.4pt; font-size: 11pt; font-family: Calibri, sans-serif; background-color: white;">
<b class=""><span lang="EN-GB" style="font-size: 12pt; font-family: Arial, sans-serif;" class="">Dr. Giuseppe Angelo Zito</span></b><span lang="EN-GB" style="font-size: 12pt; font-family: Arial, sans-serif; color: rgb(34, 34, 34);" class=""><o:p class=""></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 2.4pt; font-size: 11pt; font-family: Calibri, sans-serif; background-color: white;">
<span lang="EN-GB" style="font-size: 9.5pt; font-family: Arial, sans-serif; color: rgb(89, 89, 89);" class="">Principal Investigator, Swiss National Science Foundation<o:p class=""></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 2.4pt; font-size: 11pt; font-family: Calibri, sans-serif; background-color: white;">
<span lang="EN-GB" style="font-size: 9.5pt; font-family: Arial, sans-serif; color: rgb(89, 89, 89);" class=""><o:p class=""> </o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 2.4pt; font-size: 11pt; font-family: Calibri, sans-serif; background-color: white;">
<span lang="EN-GB" style="font-size: 9.5pt; font-family: Arial, sans-serif; color: rgb(89, 89, 89);" class="">Decision Neuroscience Lab<o:p class=""></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 2.4pt; font-size: 11pt; font-family: Calibri, sans-serif; background-color: white;">
<span lang="EN-GB" style="font-size: 9.5pt; font-family: Arial, sans-serif; color: rgb(89, 89, 89);" class="">Department of Health Sciences and Technology (D-HEST)<o:p class=""></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 2.4pt; font-size: 11pt; font-family: Calibri, sans-serif; background-color: white;">
<span lang="EN-GB" style="font-size: 9.5pt; font-family: Arial, sans-serif; color: rgb(89, 89, 89);" class="">ETH – Swiss Federal Institute of Technology Zurich<o:p class=""></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 2.4pt; font-size: 11pt; font-family: Calibri, sans-serif; background-color: white;">
<span lang="FR-CH" style="font-size: 9.5pt; font-family: Arial, sans-serif; color: rgb(89, 89, 89);" class=""><o:p class=""> </o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 2.4pt; font-size: 11pt; font-family: Calibri, sans-serif; background-color: white;">
<span lang="FR-CH" style="font-size: 9.5pt; font-family: Arial, sans-serif; color: rgb(89, 89, 89);" class="">Winterthurerstrasse 190<o:p class=""></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 2.4pt; font-size: 11pt; font-family: Calibri, sans-serif; background-color: white;">
<span lang="FR-CH" style="font-size: 9.5pt; font-family: Arial, sans-serif; color: rgb(89, 89, 89);" class="">8057 Zürich<o:p class=""></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 2.4pt; font-size: 11pt; font-family: Calibri, sans-serif; background-color: white;">
<span lang="FR-CH" style="font-size: 9.5pt; font-family: Arial, sans-serif; color: rgb(89, 89, 89);" class="">Switzerland<o:p class=""></o:p></span></p>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 9.5pt; font-family: Arial, sans-serif;" class=""><o:p class=""> </o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 9.5pt; font-family: Arial, sans-serif; color: rgb(89, 89, 89);" class="">Tel: +41 44 633 05 17<o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 9.5pt; font-family: Arial, sans-serif; color: rgb(89, 89, 89);" class="">mailto:<span class="Apple-converted-space"> </span><a href="mailto:giuseppeangelo.zito@hest.ethz.ch" style="color: blue; text-decoration: underline;" class="">giuseppeangelo.zito@hest.ethz.ch</a><o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;" class=""><o:p class=""> </o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: Arial, sans-serif;" class=""><o:p class=""> </o:p></span></div>
<div class="">
<div style="border-style: solid none none; border-top-width: 1pt; border-top-color: rgb(225, 225, 225); padding: 3pt 0cm 0cm;" class="">
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<b class=""><span lang="EN-US" class="">From:</span></b><span lang="EN-US" class=""><span class="Apple-converted-space"> </span>fieldtrip <<a href="mailto:fieldtrip-bounces@science.ru.nl" class="">fieldtrip-bounces@science.ru.nl</a>><span class="Apple-converted-space"> </span><b class="">On
 Behalf Of<span class="Apple-converted-space"> </span></b>Schoffelen, J.M. (Jan Mathijs) via fieldtrip<br class="">
<b class="">Sent:</b><span class="Apple-converted-space"> </span>15 August 2022 08:55<br class="">
<b class="">To:</b><span class="Apple-converted-space"> </span>FieldTrip discussion list <<a href="mailto:fieldtrip@science.ru.nl" class="">fieldtrip@science.ru.nl</a>><br class="">
<b class="">Cc:</b><span class="Apple-converted-space"> </span>Schoffelen, J.M. (Jan Mathijs) <<a href="mailto:janmathijs.schoffelen@donders.ru.nl" class="">janmathijs.schoffelen@donders.ru.nl</a>><br class="">
<b class="">Subject:</b><span class="Apple-converted-space"> </span>Re: [FieldTrip] Layout rotated by 90 deg<o:p class=""></o:p></span></div>
</div>
</div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
Hi Giuseppe, <span class="Apple-converted-space"> </span><o:p class=""></o:p></div>
<div class="">
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
</div>
<div class="">
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
At first sight it looks as if something is not going right with the specified rotation of the electrode positions. Have you tried to set a breakpoint in the code and go through it step by step to see what is happening in detail? This should give you some more
 clues about what is not going entirely right. It’s hard from a distance to diagnose this.<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
</div>
<div class="">
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
If you have difficulties in diagnosing it yourself, you may want to share some relevant data with us (at minimum your data.elec) so that an adventurous colleague - who is reading along - can have a go at it.<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
</div>
<div class="">
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
Best wishes,<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
Jan-Mathijs<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
</div>
<div class="">
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
</div>
<div class="">
<div class="">
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<br class="">
<br class="">
<o:p class=""></o:p></div>
<blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class="">
<div class="">
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
On 9 Aug 2022, at 18:51, Zito Giuseppe Angelo via fieldtrip <<a href="mailto:fieldtrip@science.ru.nl" style="color: blue; text-decoration: underline;" class="">fieldtrip@science.ru.nl</a>> wrote:<o:p class=""></o:p></div>
</div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
<div class="">
<div class="">
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;" class="">Dear Fieldtrip experts,</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;" class=""> </span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;" class="">I have a problem with the EEG layout, which appears to be rotated by 90 degrees.</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;" class=""> </span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;" class="">I import data from EEGlab (power spectra), and run the stats in fieldtrip (</span><span style="font-size: 10pt; font-family: "Courier New";" class="">ft_freqstatistics</span><span lang="EN-GB" style="font-size: 12pt; font-family: "Courier New";" class="">)</span><span lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;" class="">.</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;" class="">I have my own layout with 118 electrodes, which I created with<span class="apple-converted-space"> </span></span><span style="font-size: 10pt; font-family: "Courier New";" class="">ft_prepare_layout</span><span lang="EN-GB" style="font-size: 10pt; font-family: "Courier New";" class="">.</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;" class=""> </span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;" class="">While calling<span class="apple-converted-space"> </span></span><span style="font-size: 10pt; font-family: "Courier New";" class="">ft_clusterplot</span><span class="apple-converted-space"><span lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;" class=""> </span></span><span lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;" class="">or<span class="apple-converted-space"> </span></span><span style="font-size: 10pt; font-family: "Courier New";" class="">ft_topoplotER</span><span lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;" class="">,
 Matlab sends the following warning:</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 12pt; font-family: "Courier New";" class=""> </span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: "Courier New";" class="">the input is freq data with 118 channels, 4 frequencybins and no timebins</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: "Courier New";" class="">creating layout from data.elec</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: "Courier New";" class="">creating layout for ext1020 system</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: "Courier New";" class="">Warning: use cfg.rotate to specify the correct rotation of the sensors</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: "Courier New";" class=""> In ft_prepare_layout>sens2lay at line 1300</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: "Courier New";" class="">In ft_prepare_layout at line 596</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: "Courier New";" class="">In ft_clusterplot at line 123</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: "Courier New";" class=""> </span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;" class="">The resulting topoplot is indeed tilted (see picture attached).</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;" class=""> </span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;" class="">I tried to add<span class="apple-converted-space"> </span></span><span lang="EN-GB" style="font-size: 10pt; font-family: "Courier New";" class="">cfg.rotate = -90</span><span class="apple-converted-space"><span lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;" class=""> </span></span><span lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;" class="">and
 run again<span class="apple-converted-space"> </span></span><span style="font-size: 10pt; font-family: "Courier New";" class="">ft_prepare_layout</span><span lang="EN-GB" style="font-size: 10pt; font-family: "Courier New";" class="">,<span class="apple-converted-space"> </span></span><span lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;" class="">but
 the problem was unsolved.</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;" class=""> </span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;" class="">Could you please help to solve this issue?</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;" class="">In case I have to modify the layout with<span class="apple-converted-space"> </span></span><span style="font-size: 10pt; font-family: "Courier New";" class="">ft_prepare_layout</span><span lang="EN-GB" style="font-size: 10pt; font-family: "Courier New";" class="">,</span><span lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;" class="">could
 you please give me a sample code to fix that?</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;" class=""> </span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;" class="">Thank you very much,</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;" class="">Giuseppe Zito</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: Arial, sans-serif;" class=""> </span><o:p class=""></o:p></div>
</div>
<div class="">
<div class="">
<div class="">
<div class="">
<div class="MsoNormal" style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif; background-color: white;">
<span lang="DE-CH" style="font-size: 10pt; font-family: Arial, sans-serif;" class="">
<hr size="2" width="100%" align="left" class="">
</span></div>
</div>
</div>
</div>
</div>
<p class="MsoNormal" style="margin: 0cm 0cm 2.4pt; font-size: 11pt; font-family: Calibri, sans-serif; background-color: white;">
<b class=""><span lang="EN-GB" style="font-size: 12pt; font-family: Arial, sans-serif;" class="">Dr. Giuseppe Angelo Zito</span></b><o:p class=""></o:p></p>
<p class="MsoNormal" style="margin: 0cm 0cm 2.4pt; font-size: 11pt; font-family: Calibri, sans-serif; background-color: white;">
<span lang="EN-GB" style="font-size: 9.5pt; font-family: Arial, sans-serif; color: rgb(89, 89, 89);" class="">Principal Investigator, Swiss National Science Foundation</span><o:p class=""></o:p></p>
<p class="MsoNormal" style="margin: 0cm 0cm 2.4pt; font-size: 11pt; font-family: Calibri, sans-serif; background-color: white;">
<span lang="EN-GB" style="font-size: 9.5pt; font-family: Arial, sans-serif; color: rgb(89, 89, 89);" class=""> </span><o:p class=""></o:p></p>
<p class="MsoNormal" style="margin: 0cm 0cm 2.4pt; font-size: 11pt; font-family: Calibri, sans-serif; background-color: white;">
<span lang="EN-GB" style="font-size: 9.5pt; font-family: Arial, sans-serif; color: rgb(89, 89, 89);" class="">Decision Neuroscience Lab</span><o:p class=""></o:p></p>
<p class="MsoNormal" style="margin: 0cm 0cm 2.4pt; font-size: 11pt; font-family: Calibri, sans-serif; background-color: white;">
<span lang="EN-GB" style="font-size: 9.5pt; font-family: Arial, sans-serif; color: rgb(89, 89, 89);" class="">Department of Health Sciences and Technology (D-HEST)</span><o:p class=""></o:p></p>
<p class="MsoNormal" style="margin: 0cm 0cm 2.4pt; font-size: 11pt; font-family: Calibri, sans-serif; background-color: white;">
<span lang="EN-GB" style="font-size: 9.5pt; font-family: Arial, sans-serif; color: rgb(89, 89, 89);" class="">ETH – Swiss Federal Institute of Technology Zurich</span><o:p class=""></o:p></p>
<p class="MsoNormal" style="margin: 0cm 0cm 2.4pt; font-size: 11pt; font-family: Calibri, sans-serif; background-color: white;">
<span lang="FR-CH" style="font-size: 9.5pt; font-family: Arial, sans-serif; color: rgb(89, 89, 89);" class=""> </span><o:p class=""></o:p></p>
<p class="MsoNormal" style="margin: 0cm 0cm 2.4pt; font-size: 11pt; font-family: Calibri, sans-serif; background-color: white;">
<span lang="FR-CH" style="font-size: 9.5pt; font-family: Arial, sans-serif; color: rgb(89, 89, 89);" class="">Winterthurerstrasse 190</span><o:p class=""></o:p></p>
<p class="MsoNormal" style="margin: 0cm 0cm 2.4pt; font-size: 11pt; font-family: Calibri, sans-serif; background-color: white;">
<span lang="FR-CH" style="font-size: 9.5pt; font-family: Arial, sans-serif; color: rgb(89, 89, 89);" class="">8057 Zürich</span><o:p class=""></o:p></p>
<p class="MsoNormal" style="margin: 0cm 0cm 2.4pt; font-size: 11pt; font-family: Calibri, sans-serif; background-color: white;">
<span lang="FR-CH" style="font-size: 9.5pt; font-family: Arial, sans-serif; color: rgb(89, 89, 89);" class="">Switzerland</span><o:p class=""></o:p></p>
<div class="">
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 9.5pt; font-family: Arial, sans-serif;" class=""> </span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 9.5pt; font-family: Arial, sans-serif; color: rgb(89, 89, 89);" class="">Tel: +41 44 633 05 17</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 9.5pt; font-family: Arial, sans-serif; color: rgb(89, 89, 89);" class="">mailto:<span class="apple-converted-space"> </span><a href="mailto:giuseppeangelo.zito@hest.ethz.ch" style="color: blue; text-decoration: underline;" class="">giuseppeangelo.zito@hest.ethz.ch</a></span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: Arial, sans-serif;" class=""> </span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
 <o:p class=""></o:p></div>
</div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<Untitled.png><span style="font-size: 10.5pt; font-family: Helvetica, sans-serif;" class="">_______________________________________________<br class="">
fieldtrip mailing list<br class="">
</span><a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" style="color: blue; text-decoration: underline;" class=""><span style="font-size: 10.5pt; font-family: Helvetica, sans-serif;" class="">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</span></a><span style="font-size: 10.5pt; font-family: Helvetica, sans-serif;" class=""><br class="">
</span><a href="https://urldefense.com/v3/__https:/doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!_Yw6qS8Z5niJVPKpRGNnGlL7pmqC9sbtd8zsEvVYoivZqCt0pPdamcl6IWl_kpYELPkMcqTeMrU8sw6NzkN140T2g1iK5gvA0jr9mQ$" style="color: blue; text-decoration: underline;" class=""><span style="font-size: 10.5pt; font-family: Helvetica, sans-serif;" class="">https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!_Yw6qS8Z5niJVPKpRGNnGlL7pmqC9sbtd8zsEvVYoivZqCt0pPdamcl6IWl_kpYELPkMcqTeMrU8sw6NzkN140T2g1iK5gvA0jr9mQ$</span></a><span class="apple-converted-space"><span style="font-size: 10.5pt; font-family: Helvetica, sans-serif;" class=""> </span></span><span style="font-size: 10.5pt; font-family: Helvetica, sans-serif;" class=""> </span><o:p class=""></o:p></div>
</div>
</blockquote>
</div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
</div>
</div>
<span id="cid:EBA9D36B-AC59-4367-85F0-C8348F7C5770"><ExampleEEG.zip></span></div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>