<div dir="ltr">Dear FieldTrip users,<div>I use the  <a href="https://download.fieldtriptoolbox.org/tutorial/ArtifactMEG.zip" target="_blank" style="color:rgb(113,24,28);box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:16px;text-align:justify">ArtifactMEG.zip</a><span style="color:rgb(33,37,41);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:16px;text-align:justify"> example MEG dataset</span> and code in the link <a href="https://www.fieldtriptoolbox.org/tutorial/ica_artifact_cleaning/" target="_blank">https://www.fieldtriptoolbox.org/tutorial/ica_artifact_cleaning/</a> to remove the artifact as follows:</div><div>cfg = [];<br>cfg.continuous = 'yes';  <br>cfg.blocksize = 60;   <br>cfg.plotevents = 'no';<br>cfg.preproc.demean  = 'yes';<br>cfg.layout = 'CTF151.lay';<br>cfg = ft_databrowser(cfg, data);<br></div><div>cfg_artfctdef = cfg.artfctdef;<br></div><div><br></div><div>cfg = [];<br>cfg.artifactdef = cfg_artfctdef;<br>cfg.artfctdef.reject = 'nan';<br>data_clean = ft_rejectartifact(cfg, data);<br></div><div><br></div><div>For two reasons, the specified regions of the artifact are not replaced by the nan value:</div><div>1) The output printed in the command window is:</div><div>rejected   0 trials completely<br>rejected   0 trials partially<br>filled parts of   0 trials with NaNs<br>filled parts of   0 trials with the specified value<br>resulting   1 trials<br>the call to "ft_rejectartifact" took 1 seconds<br></div><div>2) When I use the ft_singleplotER or ft_databrowser function again for data_clean, basically the areas replaced with the nan value should be invisible, which is not the case.</div><div>Can anyone explain to me what's the problem?</div><div>Thank you,</div><div>Erfan Vajdi</div></div>