<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hello everyone,<br>I am trying to do the automatic artifact rejection after removing ICA components but I am having some trouble with cfg.dataset.<br>If I input the ". eeg" file, the artifact rejection is done with the original file, which means that I lose all the preprocessing steps (data segmentation and filtering) including the ICA. I have tried with inputting the variable of the last step that I have done with the data (as you will see in the code) but it does not work.<br>The same happened to me when I tried to segment my data in trials after doing all the preprocessing and the ICA (which is what I originally wanted to do), I lost everything when inputting cfg.dataset.<br><br>Here you have a bit of my coding for reference:<br><br>cfg = [];<br>cfg.dataset = data_ica_cleaned.trial(:,:);<br></div><div>cfg.continuous = 'no';<br>cfg.artfctdef.threshold.channel     = 'all';<br>cfg.artfctdef.threshold.max = 75; %value in uV or T, default  inf<br>cfg.artfctdef.threshold.min = -75; %value in uV or T, default -inf<br>cfg.artfctdef.threshold.interactive = 'yes';<br>[cfg, artifact] = ft_artifact_threshold(cfg, data_ica_cleaned);<br> <br>cfg.viewmode = 'vertical';<br>cfg.layout = lay;<br>ft_databrowser(cfg,data_ica_cleaned);<br><br clear="all">This is what I get back:<br>Warning: The field cfg.dataset is forbidden, it will be removed from your configuration<br> <br>Error using ft_fetch_data (line 159)<br>some of the requested samples occur twice in the data and have conflicting values</div><div>Error in ft_artifact_threshold (line 197)<br>    dat = ft_fetch_data(data,        'header', hdr, 'begsample', cfg.trl(trlop,1), 'endsample', cfg.trl(trlop,2), 'chanindx', channelindx,<br>    'checkboundary', strcmp(cfg.continuous, 'no'));<br><br>It seems it is not doing anything, even when I put extreme threshold values (-15 +15) it keeps saying:<br><br>the input is raw data with 64 channels and 107 trials<br>detected   0 visual artifacts<br><br><span style="font:400 13.33px/19.99px Arial,Helvetica,sans-serif;text-align:left;color:rgb(34,34,34);text-transform:none;text-indent:0px;letter-spacing:normal;text-decoration:none;word-spacing:0px;display:inline;white-space:normal;font-size-adjust:none;font-stretch:100%;float:none;background-color:transparent">I hope I explained my problem in a simple way.. Does anyone have any suggestions? <br><br>Thanks in advance,<br>Iris</span><br>-- <br></div><div class="gmail_signature" dir="ltr"><div dir="ltr"><div><div dir="ltr"><span><b>Iris Milán Maillo</b><br>
 <br>
 PhD Student<br><a href="https://www.upf.edu/web/spb" target="_blank">Speech Production and Bilingualism (SPB)</a><br>
 <a href="http://cbc.upf.edu/cbc.upf.edu/" target="_blank">Center for Brain and Cognition (CBC)</a><br>
 <br> 
 Carrer de Ramon Trias Fargas, 25-27, 08005 Barcelona | Edifici Merce Rodoreda, (room 24.311)<br>
 </span></div></div></div></div></div></div></div></div></div>