<div dir="ltr">Dear FieldTrip users,<div>I use the
<a href="https://urldefense.com/v3/__https://download.fieldtriptoolbox.org/tutorial/ArtifactMEG.zip__;!!HJOPV4FYYWzcc1jazlU!4vKXD91CTmKqghFOD3Hgu_P6uxQdXXMKO4yQwwLLlgsOkdwBZ385rFZK23er0FM8P4cEUSNk0NW_7HzsUvmxaFOIew$" style="box-sizing:border-box;color:rgb(113,24,28);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://urldefense.com/v3/__https://www.fieldtriptoolbox.org/tutorial/ica_artifact_cleaning/__;!!HJOPV4FYYWzcc1jazlU!4vKXD91CTmKqghFOD3Hgu_P6uxQdXXMKO4yQwwLLlgsOkdwBZ385rFZK23er0FM8P4cEUSNk0NW_7HzsUvmxQBI3Lw$">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 null 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_databrowser function again for data_clean, basically the areas replaced with the null 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>