<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=""><div dir="auto" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div dir="auto" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div dir="auto" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div dir="auto" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Anne,<div class=""><br class=""></div><div class="">There seems to be a problem with ft_prepare_layout as is doesn’t construct the correct sensors layout from your data. However, you can read the layout structure simply from the provided layout file without handing over your MEG data to the function.</div><div class=""><br class=""></div><div class="">So just open the icabrowser ("edit ft_icabrowser.m") and change line 53 from</div><div class=""><div style="margin: 0px; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Courier;" class=""><span class="Apple-tab-span" style="white-space:pre">  </span>lay = ft_prepare_layout(cfglay, comp);</div></div><div class="">to</div><div class=""><div style="margin: 0px; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Courier;" class=""><span class="Apple-tab-span" style="white-space:pre">     </span>lay = ft_prepare_layout(cfglay);</div></div><div class=""><br class=""></div><div class="">The topotplot function should work again now. </div><div class=""><br class=""></div><div class="">Nevertheless, you will still run into problems with the power spectrum (left panel in the figure) as it won’t show any data. I checked your data and saw that every ica component also contains NaNs. This means that the fft analysis will result in only NaNs as well. You may consider to just get rid of them before computing the power spectrum (which is done in lines 102-109). </div><div class=""><br class=""></div><div class="">Moreover, the icabrowser was originally coded for trial-based data and only every 5th trial was considered for the power analysis. Otherwise, it just takes too long to plot every single component. However, I saw that your data only contains (continous?) data from a single trial. Computing the fft of the whole recording would take ages. So, in case your data is continuous data from resting state for example, you may also consider to divide your data into epochs and take only every 5th epoch or so for the power analysis. I have coded something in that direction for you but I am not sure what kind of data you have and if it suits your data. I just divided the data in epochs of 1s length and took every 5th epoch for the analysis. Please find the code below. You may just further adjust the code so that it better suits your data.</div><div class=""><br class=""></div><div class="">Change line 34 from </div><div class=""><span style="font-family: Courier; font-size: 10px;" class=""><span class="Apple-tab-span" style="white-space:pre">    </span>fft_data = cat(2,comp.trial{1:5:end});</span></div><div class=""><span style="font-family: Courier;" class="">to</span></div><div class=""><span style="font-family: Courier; font-size: 10px;" class=""><span class="Apple-tab-span" style="white-space:pre">       </span>fft_data = comp.trial{1};</span></div><div class=""><span style="font-family: Courier; font-size: 10px;" class=""><br class=""></span></div><div class="">And lines 104 - 106 from</div><div class=""><div style="margin: 0px; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Courier;" class=""><span class="Apple-tab-span" style="white-space:pre">       </span>Fs = comp.fsample;</div><div style="margin: 0px; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Courier;" class=""><span class="Apple-tab-span" style="white-space:pre">       </span>N = floor(size(fft_data,2));</div><div style="margin: 0px; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Courier;" class=""><span class="Apple-tab-span" style="white-space:pre">     </span>xdft = fft(fft_data(i,:));</div></div><div class="">to</div><div class=""><div style="margin: 0px; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Courier;" class="">        comp_data = fft_data(i,~isnan(fft_data(i,:))); <span style="color: #25992d" class="">% kick out all NaNs first</span></div><div style="margin: 0px; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Courier; color: rgb(37, 153, 45);" class=""><span style="color: #000000" class="">        epochJump = 5; </span>% how many trials to jump over?</div><div style="margin: 0px; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Courier;" class="">        numEpochs = size(comp_data,2)/comp.fsample;</div><div style="margin: 0px; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Courier;" class="">        fft_data_i = [];</div><div style="margin: 0px; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Courier;" class="">        <span style="color: #0433ff" class="">for</span> i_epoch = 1:epochJump:numEpochs</div><div style="margin: 0px; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Courier;" class="">            epochdata = comp_data((i_epoch-1)*comp.fsample+1:i_epoch*comp.fsample);</div><div style="margin: 0px; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Courier;" class="">            fft_data_i = [fft_data_i,epochdata];</div><div style="margin: 0px; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Courier;" class="">        <span style="color: #0433ff" class="">end</span></div><div style="margin: 0px; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Courier;" class="">        N = floor(size(fft_data_i,2));</div><div style="margin: 0px; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Courier;" class="">        xdft = fft(fft_data_i);</div></div><div class=""><br class=""></div><div class="">Or you just download the edited file from <a href="https://wetransfer.com/downloads/291481693ee0f04e1e9335d78e71912a20180521182605/79e5bd53d8724c2a212d5d2f279fac6420180521182605/722e3c" class="">here</a>. :)</div><div class=""><br class=""></div><div class="">Hope this helps! Please get in touch with me if you have any further question. </div><div class=""><br class=""></div><div class="">Cheers,</div><div class="">Jonathan</div><div class=""><br class=""></div><div class=""><br class=""><div class="">
<div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;">-----</div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;"><br class="">Jonathan Daume, PhD<br class=""><br class="">Dept. of Neurophysiology and Pathophysiology<br class="">University Medical Center Hamburg Eppendorf<br class="">Martinistr. 52<br class="">20246 Hamburg<br class="">Germany<br class=""><br class="">Phone: +49-40-7410-55856<br class=""><a href="mailto:j.daume@uke.de" class="">Email: j.daume@uke.de</a><br class="">www.uke.de</div>
</div>
<div><br class=""><blockquote type="cite" class=""><div class="">Am 17.05.2018 um 15:06 schrieb Annekathrin Weise <<a href="mailto:annekathrinweise@gmail.com" class="">annekathrinweise@gmail.com</a>>:</div><br class="Apple-interchange-newline"><div class="">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" class="">
  
  <div text="#000000" bgcolor="#FFFFFF" class=""><p class="">Dear all,</p><p class="">I am interested in using the ft_icabrowser to inpsect ICA
      components.</p><p class="">I run into a potential bug (see my code and the related error
      messages in the screenshot below).</p><p class="">Note that I also used the ft_databrowser to inspect the
      independent components what worked nicely. So, there seems to be
      no issue with the data "ica_components' itself.</p><p class="">In case you want to have a closer look to efficiently evaluate
      the problem, you can find the data <a moz-do-not-send="true" href="https://oc.th-ht.de/index.php/s/6DA8eHK293ToT8S" class="">here.</a><br class="">
    </p><p class="">I appreciate any help to find a workaround.</p><p class="">Cheers,</p><p class="">Anne<br class="">
    </p><p class=""> <br class="">
    </p><p class=""><span id="cid:part2.8466F5E3.A80D41DC@gmail.com"><hagbbfcodljipehl.png></span></p>
    <pre class="moz-signature" cols="72">-- 
Annekathrin Weise, Dr.

Paris-Lodron Universität Salzburg
Division of Physiological Psychology
Hellbrunnerstraße 34
5020 Salzburg
Austria

e-mail: <a class="moz-txt-link-abbreviated" href="mailto:annekathrin.weise@sbg.ac.at">annekathrin.weise@sbg.ac.at</a>;
<a class="moz-txt-link-abbreviated" href="mailto:annekathrinweise@gmail.com">annekathrinweise@gmail.com</a>

web: 
<a class="moz-txt-link-freetext" href="http://www.oboblab.at/">http://www.oboblab.at/</a>
<a class="moz-txt-link-freetext" href="https://sites.google.com/site/weiseannekathrin/">https://sites.google.com/site/weiseannekathrin/</a> 




</pre>
  </div>

_______________________________________________<br class="">fieldtrip mailing list<br class=""><a href="mailto:fieldtrip@donders.ru.nl" class="">fieldtrip@donders.ru.nl</a><br class="">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip<br class=""></div></blockquote></div><br class=""></div></div></div></div></div><br>
<hr style="color:#999999;" size="1">
<p style="font-size:x-small; color:#999999;">Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg | <a href="http://www.uke.de">www.uke.de</a><br>
Vorstandsmitglieder: Prof. Dr. Burkhard Göke (Vorsitzender), Prof. Dr. Dr. Uwe Koch-Gromus, Joachim Prölß, Martina Saurin (komm.)</p>
<hr style="color:#999999;" size="1">
<p style="font-size:x-small; color:#999999;">SAVE PAPER - THINK BEFORE PRINTING</p></body></html>