<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Courier;
        panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:DengXian;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Times New Roman \(Body CS\)";
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:"\@DengXian";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:Helvetica;
        color:windowtext;}
p.p1, li.p1, div.p1
        {mso-style-name:p1;
        margin:0in;
        font-size:7.5pt;
        font-family:Courier;}
p.p2, li.p2, div.p2
        {mso-style-name:p2;
        margin:0in;
        font-size:7.5pt;
        font-family:Courier;
        color:#028009;}
p.p3, li.p3, div.p3
        {mso-style-name:p3;
        margin:0in;
        font-size:7.5pt;
        font-family:Courier;}
span.s1
        {mso-style-name:s1;
        color:black;}
span.s2
        {mso-style-name:s2;
        color:#AA04F9;}
span.apple-converted-space
        {mso-style-name:apple-converted-space;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-family:Helvetica">Hello,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Helvetica"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:Helvetica">I'm new to Fieldtrip and I encountered a problem in ICA – after rejecting bad components with ft_rejectcomponent I noticed my data can't be plotted by databrowser anymore, but before this step it can
 be visualized just fine. This is how I am perform ICA – is there something wrong in the ft_rejectcomponent part? Thank you for your help!
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Helvetica"><o:p> </o:p></span></p>
<p class="p1"><span class="apple-converted-space"> </span><o:p></o:p></p>
<p class="p2"><span class="apple-converted-space">    </span>%% ICA<o:p></o:p></p>
<p class="p2"><span class="apple-converted-space"><span style="color:black">    </span>
</span>% perform the independent component analysis (i.e., decompose the data), downsampling first<o:p></o:p></p>
<p class="p3"><span class="apple-converted-space">    </span>cfg<span class="apple-converted-space">           
</span>= [];<o:p></o:p></p>
<p class="p3"><span class="apple-converted-space">    </span>cfg.resamplefs = 150;
<o:p></o:p></p>
<p class="p3"><span class="apple-converted-space">    </span>cfg.detrend<span class="apple-converted-space">   
</span>= <span class="s2">'no'</span>;<o:p></o:p></p>
<p class="p3"><span class="apple-converted-space">    </span>data <span class="apple-converted-space">
          </span>= ft_resampledata(cfg, data_all);<o:p></o:p></p>
<p class="p1"><span class="apple-converted-space">    </span><o:p></o:p></p>
<p class="p3"><span class="apple-converted-space">    </span>cfg<span class="apple-converted-space">       
</span>= [];<o:p></o:p></p>
<p class="p2"><span class="apple-converted-space"><span style="color:black">    </span>
</span><span class="s1">cfg.method = </span><span class="s2">'runica'</span><span class="s1">;
</span>% this is the default and uses the implementation from EEGLAB<o:p></o:p></p>
<p class="p3"><span class="apple-converted-space">    </span>comp = ft_componentanalysis(cfg, data);<o:p></o:p></p>
<p class="p1"><span class="apple-converted-space">    </span><o:p></o:p></p>
<p class="p2"><span class="apple-converted-space"><span style="color:black">    </span>
</span>%Identify components reflecting eye artifacts<o:p></o:p></p>
<p class="p2"><span class="apple-converted-space"><span style="color:black">    </span>
</span>% plot the components for visual inspection<o:p></o:p></p>
<p class="p3"><span class="apple-converted-space">    </span>figure<o:p></o:p></p>
<p class="p3"><span class="apple-converted-space">    </span>cfg = [];<o:p></o:p></p>
<p class="p2"><span class="apple-converted-space"><span style="color:black">    </span>
</span><span class="s1">cfg.component = 1:20; </span><span class="apple-converted-space"><span style="color:black">     
</span></span>% specify the component(s) that should be plotted<o:p></o:p></p>
<p class="p2"><span class="apple-converted-space"><span style="color:black">    </span>
</span><span class="s1">cfg.layout</span><span class="apple-converted-space"><span style="color:black">   
</span></span><span class="s1">= </span><span class="s2">'acticap-64ch-standard2_XZ.mat'</span><span class="s1">;
</span>% specify the layout file that should be used for plotting<o:p></o:p></p>
<p class="p3"><span class="apple-converted-space">    </span>cfg.comment <span class="apple-converted-space">
  </span>= <span class="s2">'no'</span>;<o:p></o:p></p>
<p class="p3"><span class="apple-converted-space">    </span>ft_topoplotIC(cfg, comp)<o:p></o:p></p>
<p class="p1"><span class="apple-converted-space">    </span><o:p></o:p></p>
<p class="p2"><span class="apple-converted-space"><span style="color:black">    </span>
</span>%Further inspection of time course of component<o:p></o:p></p>
<p class="p3"><span class="apple-converted-space">    </span>cfg = [];<o:p></o:p></p>
<p class="p2"><span class="apple-converted-space"><span style="color:black">    </span>
</span><span class="s1">cfg.layout = </span><span class="s2">'acticap-64ch-standard2_XZ.mat'</span><span class="s1">;
</span>% specify the layout file that should be used for plotting<o:p></o:p></p>
<p class="p3"><span class="apple-converted-space">    </span>cfg.viewmode = <span class="s2">
'component'</span>;<o:p></o:p></p>
<p class="p3"><span class="apple-converted-space">    </span>ft_databrowser(cfg, comp)<o:p></o:p></p>
<p class="p1"><span class="apple-converted-space"> </span><o:p></o:p></p>
<p class="p2"><span class="apple-converted-space"><span style="color:black">    </span>
</span>%Removing bad artifacts and backprojecting data<o:p></o:p></p>
<p class="p3"><span class="apple-converted-space">    </span>cfg = [];<o:p></o:p></p>
<p class="p2"><span class="apple-converted-space"><span style="color:black">    </span>
</span><span class="s1">cfg.component = 1; </span>% to be removed component(s)<o:p></o:p></p>
<p class="p3"><span class="apple-converted-space">    </span>data_all = ft_rejectcomponent(cfg, comp, data_all);<o:p></o:p></p>
<p class="MsoNormal"><span style="font-family:Helvetica"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:Helvetica">Best, <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Helvetica">Anqi<o:p></o:p></span></p>
<p class="p1"><o:p> </o:p></p>
</div>
</body>
</html>