<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 Anqi,
<div class=""><br class="">
</div>
<div class="">in order for the readership of this list to be able to help you solve your problem, it might be useful if you provide us at least with the following information:</div>
<div class=""><br class="">
</div>
<div class="">- the error message(s) you get.</div>
<div class="">- which version of the code is giving you problems.</div>
<div class="">- which version of the code does not give you problems.</div>
<div class=""><br class="">
</div>
<div class="">Best wishes,</div>
<div class="">Jan-Mathijs</div>
<div class=""><br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 27 Mar 2022, at 23:38, Lei, A. (Anqi) via fieldtrip <<a href="mailto:fieldtrip@science.ru.nl" class="">fieldtrip@science.ru.nl</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: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-family: Helvetica;" class="">Hello,<o:p class=""></o:p></span></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-family: Helvetica;" class=""><o:p class=""> </o:p></span></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-family: Helvetica;" class="">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 class=""></o:p></span></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-family: Helvetica;" class=""><o:p class=""> </o:p></span></div>
<div style="margin: 0in; font-size: 7.5pt; font-family: Courier;" class=""><span class="apple-converted-space"> </span><o:p class=""></o:p></div>
<div style="margin: 0in; font-size: 7.5pt; font-family: Courier; color: rgb(2, 128, 9);" class="">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span>%% ICA<o:p class=""></o:p></div>
<div style="margin: 0in; font-size: 7.5pt; font-family: Courier; color: rgb(2, 128, 9);" class="">
<span class="apple-converted-space"><span style="" class=""> <span class="Apple-converted-space"> </span></span></span>% perform the independent component analysis (i.e., decompose the data), downsampling first<o:p class=""></o:p></div>
<div style="margin: 0in; font-size: 7.5pt; font-family: Courier;" class=""><span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span>cfg<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span>=
[];<o:p class=""></o:p></div>
<div style="margin: 0in; font-size: 7.5pt; font-family: Courier;" class=""><span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span>cfg.resamplefs = 150;<o:p class=""></o:p></div>
<div style="margin: 0in; font-size: 7.5pt; font-family: Courier;" class=""><span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span>cfg.detrend<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span>=<span class="Apple-converted-space"> </span><span class="s2" style="color: rgb(170, 4, 249);">'no'</span>;<o:p class=""></o:p></div>
<div style="margin: 0in; font-size: 7.5pt; font-family: Courier;" class=""><span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span>data<span class="Apple-converted-space"> </span><span class="apple-converted-space">
<span class="Apple-converted-space"> </span></span>= ft_resampledata(cfg, data_all);<o:p class=""></o:p></div>
<div style="margin: 0in; font-size: 7.5pt; font-family: Courier;" class=""><span class="apple-converted-space"> </span><o:p class=""></o:p></div>
<div style="margin: 0in; font-size: 7.5pt; font-family: Courier;" class=""><span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span>cfg<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span>=
[];<o:p class=""></o:p></div>
<div style="margin: 0in; font-size: 7.5pt; font-family: Courier; color: rgb(2, 128, 9);" class="">
<span class="apple-converted-space"><span style="" class=""> <span class="Apple-converted-space"> </span></span></span><span class="s1" style="">cfg.method =<span class="Apple-converted-space"> </span></span><span class="s2" style="color: rgb(170, 4, 249);">'runica'</span><span class="s1" style="">;<span class="Apple-converted-space"> </span></span>%
this is the default and uses the implementation from EEGLAB<o:p class=""></o:p></div>
<div style="margin: 0in; font-size: 7.5pt; font-family: Courier;" class=""><span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span>comp = ft_componentanalysis(cfg, data);<o:p class=""></o:p></div>
<div style="margin: 0in; font-size: 7.5pt; font-family: Courier;" class=""><span class="apple-converted-space"> </span><o:p class=""></o:p></div>
<div style="margin: 0in; font-size: 7.5pt; font-family: Courier; color: rgb(2, 128, 9);" class="">
<span class="apple-converted-space"><span style="" class=""> <span class="Apple-converted-space"> </span></span></span>%Identify components reflecting eye artifacts<o:p class=""></o:p></div>
<div style="margin: 0in; font-size: 7.5pt; font-family: Courier; color: rgb(2, 128, 9);" class="">
<span class="apple-converted-space"><span style="" class=""> <span class="Apple-converted-space"> </span></span></span>% plot the components for visual inspection<o:p class=""></o:p></div>
<div style="margin: 0in; font-size: 7.5pt; font-family: Courier;" class=""><span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span>figure<o:p class=""></o:p></div>
<div style="margin: 0in; font-size: 7.5pt; font-family: Courier;" class=""><span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span>cfg = [];<o:p class=""></o:p></div>
<div style="margin: 0in; font-size: 7.5pt; font-family: Courier; color: rgb(2, 128, 9);" class="">
<span class="apple-converted-space"><span style="" class=""> <span class="Apple-converted-space"> </span></span></span><span class="s1" style="">cfg.component = 1:20;<span class="Apple-converted-space"> </span></span><span class="apple-converted-space"><span style="" class="">
<span class="Apple-converted-space"> </span></span></span>% specify the component(s) that should be plotted<o:p class=""></o:p></div>
<div style="margin: 0in; font-size: 7.5pt; font-family: Courier; color: rgb(2, 128, 9);" class="">
<span class="apple-converted-space"><span style="" class=""> <span class="Apple-converted-space"> </span></span></span><span class="s1" style="">cfg.layout</span><span class="apple-converted-space"><span style="" class=""> <span class="Apple-converted-space"> </span></span></span><span class="s1" style="">=<span class="Apple-converted-space"> </span></span><span class="s2" style="color: rgb(170, 4, 249);">'acticap-64ch-standard2_XZ.mat'</span><span class="s1" style="">;<span class="Apple-converted-space"> </span></span>%
specify the layout file that should be used for plotting<o:p class=""></o:p></div>
<div style="margin: 0in; font-size: 7.5pt; font-family: Courier;" class=""><span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span>cfg.comment<span class="Apple-converted-space"> </span><span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span>=<span class="Apple-converted-space"> </span><span class="s2" style="color: rgb(170, 4, 249);">'no'</span>;<o:p class=""></o:p></div>
<div style="margin: 0in; font-size: 7.5pt; font-family: Courier;" class=""><span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span>ft_topoplotIC(cfg, comp)<o:p class=""></o:p></div>
<div style="margin: 0in; font-size: 7.5pt; font-family: Courier;" class=""><span class="apple-converted-space"> </span><o:p class=""></o:p></div>
<div style="margin: 0in; font-size: 7.5pt; font-family: Courier; color: rgb(2, 128, 9);" class="">
<span class="apple-converted-space"><span style="" class=""> <span class="Apple-converted-space"> </span></span></span>%Further inspection of time course of component<o:p class=""></o:p></div>
<div style="margin: 0in; font-size: 7.5pt; font-family: Courier;" class=""><span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span>cfg = [];<o:p class=""></o:p></div>
<div style="margin: 0in; font-size: 7.5pt; font-family: Courier; color: rgb(2, 128, 9);" class="">
<span class="apple-converted-space"><span style="" class=""> <span class="Apple-converted-space"> </span></span></span><span class="s1" style="">cfg.layout =<span class="Apple-converted-space"> </span></span><span class="s2" style="color: rgb(170, 4, 249);">'acticap-64ch-standard2_XZ.mat'</span><span class="s1" style="">;<span class="Apple-converted-space"> </span></span>%
specify the layout file that should be used for plotting<o:p class=""></o:p></div>
<div style="margin: 0in; font-size: 7.5pt; font-family: Courier;" class=""><span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span>cfg.viewmode =<span class="Apple-converted-space"> </span><span class="s2" style="color: rgb(170, 4, 249);">'component'</span>;<o:p class=""></o:p></div>
<div style="margin: 0in; font-size: 7.5pt; font-family: Courier;" class=""><span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span>ft_databrowser(cfg, comp)<o:p class=""></o:p></div>
<div style="margin: 0in; font-size: 7.5pt; font-family: Courier;" class=""><span class="apple-converted-space"> </span><o:p class=""></o:p></div>
<div style="margin: 0in; font-size: 7.5pt; font-family: Courier; color: rgb(2, 128, 9);" class="">
<span class="apple-converted-space"><span style="" class=""> <span class="Apple-converted-space"> </span></span></span>%Removing bad artifacts and backprojecting data<o:p class=""></o:p></div>
<div style="margin: 0in; font-size: 7.5pt; font-family: Courier;" class=""><span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span>cfg = [];<o:p class=""></o:p></div>
<div style="margin: 0in; font-size: 7.5pt; font-family: Courier; color: rgb(2, 128, 9);" class="">
<span class="apple-converted-space"><span style="" class=""> <span class="Apple-converted-space"> </span></span></span><span class="s1" style="">cfg.component = 1;<span class="Apple-converted-space"> </span></span>% to be removed component(s)<o:p class=""></o:p></div>
<div style="margin: 0in; font-size: 7.5pt; font-family: Courier;" class=""><span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span>data_all = ft_rejectcomponent(cfg, comp, data_all);<o:p class=""></o:p></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-family: Helvetica;" class=""><o:p class=""> </o:p></span></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-family: Helvetica;" class="">Best,<span class="Apple-converted-space"> </span><o:p class=""></o:p></span></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-family: Helvetica;" class="">Anqi<o:p class=""></o:p></span></div>
<div style="margin: 0in; font-size: 7.5pt; font-family: Courier;" class=""><o:p class=""> </o:p></div>
</div>
<span style="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; float: none; display: inline !important;" class="">_______________________________________________</span><br style="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;" class="">
<span style="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; float: none; display: inline !important;" class="">fieldtrip
mailing list</span><br style="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;" class="">
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" style="font-family: Helvetica; font-size: 14px; 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;" class="">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br style="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;" class="">
<a href="https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!9pPZAj-orxSMLThTWLYj_EoBsS-_sfR6omH4Ea-iYCjE-hYVG6WkOfFdstgOBILrmb4OxZ1HYfCgpHispeJkrWvRJA3pRgxyOntpbA$" style="font-family: Helvetica; font-size: 14px; 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;" class="">https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!9pPZAj-orxSMLThTWLYj_EoBsS-_sfR6omH4Ea-iYCjE-hYVG6WkOfFdstgOBILrmb4OxZ1HYfCgpHispeJkrWvRJA3pRgxyOntpbA$</a><span style="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; float: none; display: inline !important;" class=""></span></div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>