Hi Dave,<div>Perhaps this error is due to the complex data that ft_databrowser cannot plot?  If you re-calculate the components and get out real-only values, do you still get this error?</div><div><br></div><div>Best,</div>

<div>Johanna<br><br><div class="gmail_quote">On 7 December 2011 02:07, Dave Deriso <span dir="ltr"><<a href="mailto:dderiso@ucsd.edu">dderiso@ucsd.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

I should also note that when I tried the <i>ft_databrowser</i> function it was unable to plot the component topographies because there weren't enough grid points. Have you encountered this before? Thanks again for all of your great help!!<div>



<div><br></div><div>My code:</div>
</div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div><div>cfg = [];</div></div></div><div><div><div>cfg.viewmode = 'component'</div></div></div><div><div><div>ft_databrowser(cfg, comp);</div>




</div></div></blockquote><div><div>
<div><br></div><div>Output:</div></div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div><div>creating layout from cfg.grad</div></div></div><div><div><div>creating layout for neuromag306alt system</div>




</div></div><div><div><div>the input is component data with 306 components and 306 original channels</div></div></div><div><div><div>detected   0 visual artifacts</div></div></div><div><div><div>redrawing with viewmode component</div>




</div></div><div><div><div>fetching data... done</div></div></div><div><div><div>fetching artifacts... done</div></div></div><div><div><div>preprocessing data... done</div></div></div><div><div><div>plotting artifacts...</div>




</div></div><div><div><div>plotting events...</div></div></div><div><div><div>plotting data...</div></div></div><div><div><div><br></div></div></div><div><div><div>Warning: Imaginary parts of complex X and/or Y arguments ignored </div>




</div></div><div><div><div>> In ft_plot_vector at 191</div></div></div><div><div><div>  In ft_databrowser>redraw_cb at 1309</div></div></div><div><div><div>  In ft_databrowser at 508 </div></div></div><div><div><div>




Warning: Imaginary parts of complex X and/or Y arguments ignored </div></div></div><div><div><div>> In ft_plot_vector at 191</div></div></div><div><div><div>  In ft_databrowser>redraw_cb at 1309</div></div></div><div>




<div><div>  In ft_databrowser at 508 </div></div></div><div><div><div>                                          ****** these errors repeat about 10 times, then:</div></div></div><div><div><div>plotting component topographies...</div>




</div></div><div><div><div>Error using griddata (line 79)</div></div></div><div><div><div>Not enough unique sample points specified.</div></div></div><div><div><div><br></div></div></div><div><div><div>Error in ft_plot_topo (line 153)</div>




</div></div><div><div><div>[Xi,Yi,Zi] = griddata(chanX', chanY, dat, xi', yi, interpmethod); % interpolate the topographic data</div></div></div><div><div><div><br></div></div></div><div><div><div>Error in ft_databrowser>redraw_cb (line 1377)</div>




</div></div><div><div><div>      ft_plot_topo(chanx, chany, chanz, 'mask', laychan.mask, 'interplim', 'mask', 'outline', laychan.outline, 'tag', 'topography',</div></div></div>




<div><div><div>      ...</div></div></div><div><div><div><br></div></div></div><div><div><div>Error in ft_databrowser (line 508)</div></div></div><div><div><div>redraw_cb(h);</div></div></div></blockquote><div><div>






<div> </div><div><br></div><div><br></div><div><br></div><div>Cheers,<br>Dave</div>
<br><br><div class="gmail_quote">On Tue, Dec 6, 2011 at 11:17 AM, Dave Deriso <span dir="ltr"><<a href="mailto:dderiso@ucsd.edu" target="_blank">dderiso@ucsd.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div>Dear JM and Jörn,</div><div><br></div><div>Thank you so much for your helpful suggestions. Matlab could not find/open layout file: <i>NM306.lay</i> with both <i>ft_topoplotTFR</i> and<i> ft_topoplotIC</i>. I have also tried each of the following layouts without success:</div>






<blockquote style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:40px;border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:none;border-width:initial;border-color:initial;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px">






<div>cfg.layout    =3D data.grad;</div><div>cfg.layout    =3D 'neuromag306all.lay';</div><div>cfg.layout    =3D 'neuromag306cmb.lay';</div><div>cfg.layout    =3D 'neuromag306mag.lay';</div><div>cfg.layout    =3D 'neuromag306planar.lay';</div>






<div>(and no layout cfg, as prescribed by the bottom of <a href="http://fieldtrip.fcdonders.nl/reference/ft_topoplotic" target="_blank">http://fieldtrip.fcdonders.nl/reference/ft_topoplotic</a>)</div></blockquote><div><br>





</div><div>As Jörn mentioned, the IC and sensor labels are different and, therefore, doing a string comparison will return an error. The question is then, how can I project the ICs back into sensor space and plot them topographically using the pre-existing sensor layouts? If this accomplished by the <i>ft_topoplotIC</i> function, shouldn't it expect the IC labels to be different from the layout labels?</div>






<div><br></div><div>Thanks again for all of your help!</div><div><div><br></div><div>Cheers,<br clear="all"><div>Dave Deriso</div><br>--<br><div>UCSD Institute for Neural Computation<br>UCSD Department of Neurosurgery</div>





<br>

</div><br>
<br><br></div><div><div><div class="gmail_quote">On Tue, Dec 6, 2011 at 3:55 AM, "Jörn M. Horschig" <span dir="ltr"><<a href="mailto:jm.horschig@donders.ru.nl" target="_blank">jm.horschig@donders.ru.nl</a>></span> wrote:<br>





<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    Dear Dave,<br>
    <br>
    the labels do not match indeed, because ICs do not correspond to
    single channel (obviously). I am not exactly sure how ft_topoplotIC
    is built, but you could try using ft_databrowser instead, with
    cfg.viewmode = 'component'<br>
    Hope that at least circumvents your problem.<br>
    <br>
    Best,<br>
    Jörn<div><div><br>
    <br>
    On 12/6/2011 2:45 AM, Dave Deriso wrote:
    </div></div><blockquote type="cite"><div><div>Dear Fieldtrip Users,
      <div><br>
      </div>
      <div>I am trying to implement the tutorial on using ICA to extract
        eyeblink artifacts (<a href="http://fieldtrip.fcdonders.nl/example/use_independent_component_analysis_ica_to_remove_eog_artifacts" target="_blank">http://fieldtrip.fcdonders.nl/example/use_independent_component_analysis_ica_to_remove_eog_artifacts</a>).
        Everything works, except that the labels from the IC data do not
        match the labels from the layout file, causing an error in the
        topoplotIC function. Your help in solving this is most
        appreciated.</div>
      <div><br>
      </div>
      <div><br>
      </div>
      <div>Layout labels (I am using a Neuromag 306 MEG):</div>
      <div>
        <div>'MEG0113'</div>
        <div>'MEG0112'</div>
        <div>'MEG0111'</div>
        <div>'MEG0122'</div>
        <div>'MEG0123'</div>
      </div>
      <div><br>
      </div>
      <div>IC labels:</div>
      <div>
        <div>'runica001'</div>
        <div>'runica002'</div>
        <div>'runica003'</div>
        <div>'runica004'</div>
        <div>'runica005'</div>
        <div><br>
        </div>
      </div>
      <div>
        Matlab Output:</div>
      <div>
        <div>ft_topoplotIC(cfg, comp);</div>
        <div>creating layout from data.grad</div>
        <div>creating layout for neuromag306alt system</div>
        <div>Error using ft_topoplotTFR (line 659)</div>
        <div>labels in data and labels in layout do not match</div>
        <div>Error in ft_topoplotIC (line 122)</div>
        <div>ft_topoplotTFR(cfg, varargin{:});</div>
      </div>
      <div><br>
      </div>
      <div><br>
      </div>
      <div><br>
      </div>
      <div>Cheers,<br clear="all">
        <div>Dave Deriso</div>
        <br>
        --<br>
        <div>UCSD Institute for Neural Computation<br>
          UCSD Department of Neurosurgery</div>
        <br>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      </div></div><div><pre>_______________________________________________
fieldtrip mailing list
<a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></pre>
    </div></blockquote>
    <br>
    <br>
    <pre cols="72">-- 
Jörn M. Horschig
PhD Student
Donders Institute for Brain, Cognition and Behaviour 
Centre for Cognitive Neuroimaging
Radboud University Nijmegen 
Neuronal Oscillations Group

P.O. Box 9101
NL-6500 HB Nijmegen
The Netherlands

Contact:
E-Mail: <a href="mailto:jm.horschig@donders.ru.nl" target="_blank">jm.horschig@donders.ru.nl</a>
Tel:    <a href="tel:%2B31-%280%2924-36-68493" value="+31243668493" target="_blank">+31-(0)24-36-68493</a>
Web: <a href="http://www.ru.nl/donders" target="_blank">http://www.ru.nl/donders</a>

Visiting address:
Trigon, room 2.30
Kapittelweg 29
NL-6525 EN Nijmegen
The Netherlands</pre>
  </div>

<br>_______________________________________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a><br>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br></blockquote></div><br>
</div></div></blockquote></div><br></div>
</div>
<br>_______________________________________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br></blockquote></div><br></div>