<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="">
At the risk of asking the obvious: have you 'selected and marked as artifact segments of data’ while interacting with the figure that pops up when you call ft_databrowser? 
<div class=""><br class="">
</div>
<div class="">Best wishes,</div>
<div class="">Jan-Mathijs<br class="">
<div class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 5 May 2024, at 20:33, Erfan Vi 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 dir="ltr" class="">Hi Jan Mathijs,
<div class=""><br class="">
<div class="">Hello, I apologize for the late reply<br class="">
I corrected the spelling mistake but it didn't make any difference<br class="">
</div>
<div class=""><br class="">
</div>
<div class="">Best wishes,<br class="">
</div>
<div class="">Erfan</div>
</div>
</div>
<br class="">
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Tue, Aug 8, 2023 at 12:51 PM Schoffelen, J.M. (Jan Mathijs) via fieldtrip <<a href="mailto:fieldtrip@science.ru.nl" class="">fieldtrip@science.ru.nl</a>> wrote:<br class="">
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div style="overflow-wrap: break-word;" class="">Hi Erfan,
<div class=""><br class="">
</div>
<div class="">Could it be that there is a typo here?</div>
<div class=""><br class="">
</div>
<div class="">
<blockquote type="cite" class="">
<div dir="ltr" class="">
<div class="">cfg.artifactdef = cfg_artfctdef -> cfg.artfctdef = cfg_artfctdef;</div>
</div>
</blockquote>
<div class=""><br class="">
</div>
Best wishes,</div>
<div class="">Jan-Mathijs<br class="">
<div class=""><br class="">
<blockquote type="cite" class="">
<div class="">On 24 Jul 2023, at 08:43, Erfan Vi via fieldtrip <<a href="mailto:fieldtrip@science.ru.nl" target="_blank" class="">fieldtrip@science.ru.nl</a>> wrote:</div>
<br class="">
<div class="">
<div dir="ltr" class="">Dear FieldTrip users,
<div class="">I use the  <a href="https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Furldefense.com%2Fv3%2F__https%3A%2F%2Fdownload.fieldtriptoolbox.org%2Ftutorial%2FArtifactMEG.zip__%3B!!HJOPV4FYYWzcc1jazlU!4vKXD91CTmKqghFOD3Hgu_P6uxQdXXMKO4yQwwLLlgsOkdwBZ385rFZK23er0FM8P4cEUSNk0NW_7HzsUvmxaFOIew%24&data=05%7C02%7Cfieldtrip%40science.ru.nl%7C6d475665c2cc4e85d8d808dc73db1fe4%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638512632212798218%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=X2gppSIoFzaiOksQ4gjuIvAzEwfv1R5i%2FW%2F7OCOzhso%3D&reserved=0" originalsrc="https://urldefense.com/v3/__https://download.fieldtriptoolbox.org/tutorial/ArtifactMEG.zip__;!!HJOPV4FYYWzcc1jazlU!4vKXD91CTmKqghFOD3Hgu_P6uxQdXXMKO4yQwwLLlgsOkdwBZ385rFZK23er0FM8P4cEUSNk0NW_7HzsUvmxaFOIew$" shash="HwF0HP21s9dIEc/ZprKVVc07FmEsjfYF4xHSUn1uow3/+0mtq62tAGwDt3eF3Kb9Mqv7frmtwn2opDQGxbhFfwLuJZ61KJvHki1iykpgtYAR0s6Lz60+JRHBzVL6Z3bxnm1leb1O7HWxgKLASLi3+HLjyPwEvnhIOaUtE8ZUc44=" originalsrc="https://urldefense.com/v3/__https://download.fieldtriptoolbox.org/tutorial/ArtifactMEG.zip__;!!HJOPV4FYYWzcc1jazlU!4vKXD91CTmKqghFOD3Hgu_P6uxQdXXMKO4yQwwLLlgsOkdwBZ385rFZK23er0FM8P4cEUSNk0NW_7HzsUvmxaFOIew$" shash="fXs3wctDpAXloUPkEUBkIBnDediTAtsWPBUBkOW3idemxmf1Po7OiOAECv3TGa3IhGHsbQ+4VzjA2a/JZ5nma4Yf7Ka2Lua0ntNqaxHm1utp+EZMT5l+B0KybkLkb2nmliOni1J6eipe5/zdilBIE0aty1enPDrFKwprYlpUoyg=" 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" target="_blank" class="">
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" class=""> example
 MEG dataset</span> and code in the link <a href="https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Furldefense.com%2Fv3%2F__https%3A%2F%2Fwww.fieldtriptoolbox.org%2Ftutorial%2Fica_artifact_cleaning%2F__%3B!!HJOPV4FYYWzcc1jazlU!4vKXD91CTmKqghFOD3Hgu_P6uxQdXXMKO4yQwwLLlgsOkdwBZ385rFZK23er0FM8P4cEUSNk0NW_7HzsUvmxQBI3Lw%24&data=05%7C02%7Cfieldtrip%40science.ru.nl%7C6d475665c2cc4e85d8d808dc73db1fe4%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638512632212798218%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=lnVQ3q4OfzFjZW2ZTtqjNaQJiMl2qf%2BI%2FxT46kx0FIU%3D&reserved=0" originalsrc="https://urldefense.com/v3/__https://www.fieldtriptoolbox.org/tutorial/ica_artifact_cleaning/__;!!HJOPV4FYYWzcc1jazlU!4vKXD91CTmKqghFOD3Hgu_P6uxQdXXMKO4yQwwLLlgsOkdwBZ385rFZK23er0FM8P4cEUSNk0NW_7HzsUvmxQBI3Lw$" shash="DMsGT7ISlHPSd5VpZdGnAB0Z0m7IMU73doKFa2MduhUSTBy7jvweHI0KGUoKv95FCquQAXLzmN4Zs885BeMqDP/rPR7woOk+qgyzgcPanmOISLspJJYglREv6Uxu0Gl5pVusbTK6kIUuoh7atNsCirSz1diSyhIGGNzE+XlrDns=" originalsrc="https://urldefense.com/v3/__https://www.fieldtriptoolbox.org/tutorial/ica_artifact_cleaning/__;!!HJOPV4FYYWzcc1jazlU!4vKXD91CTmKqghFOD3Hgu_P6uxQdXXMKO4yQwwLLlgsOkdwBZ385rFZK23er0FM8P4cEUSNk0NW_7HzsUvmxQBI3Lw$" shash="uaOS85lLi7OSvyTREIqWGtmIZjBs2kCaI7pHCBzYZk3qowRl+A1NByQ2Dnma7h1EyM/dFZpztYO+J1SHDwkvrOjWd48ZzlioYf/U7P9/s3BNP/crxehsofA2wHqMerOVMM6xqsByfVfT/Ec5ezHi3WtHPyfLRb2lxFfJpHzNAN4=" target="_blank" class="">https://www.fieldtriptoolbox.org/tutorial/ica_artifact_cleaning/</a>
 to remove the artifact as follows:</div>
<div class="">cfg = [];<br class="">
cfg.continuous = 'yes';  <br class="">
cfg.blocksize = 60;   <br class="">
cfg.plotevents = 'no';<br class="">
cfg.preproc.demean  = 'yes';<br class="">
cfg.layout = 'CTF151.lay';<br class="">
cfg = ft_databrowser(cfg, data);<br class="">
</div>
<div class="">cfg_artfctdef = cfg.artfctdef;<br class="">
</div>
<div class=""><br class="">
</div>
<div class="">cfg = [];<br class="">
cfg.artifactdef = cfg_artfctdef;<br class="">
cfg.artfctdef.reject = 'nan';<br class="">
data_clean = ft_rejectartifact(cfg, data);<br class="">
</div>
<div class=""><br class="">
</div>
<div class="">For two reasons, the specified regions of the artifact are not replaced by the null value:</div>
<div class="">1) The output printed in the command window is:</div>
<div class="">rejected   0 trials completely<br class="">
rejected   0 trials partially<br class="">
filled parts of   0 trials with NaNs<br class="">
filled parts of   0 trials with the specified value<br class="">
resulting   1 trials<br class="">
the call to "ft_rejectartifact" took 1 seconds<br class="">
</div>
<div class="">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 class="">Can anyone explain to me what's the problem?</div>
<div class="">Thank you,</div>
<div class="">Erfan Vajdi</div>
</div>
_______________________________________________<br class="">
fieldtrip mailing list<br class="">
<a href="https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.science.ru.nl%2Fmailman%2Flistinfo%2Ffieldtrip&data=05%7C02%7Cfieldtrip%40science.ru.nl%7C6d475665c2cc4e85d8d808dc73db1fe4%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638512632212798218%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=QSd8Wt481EUyJoQ6W3SpCgOElkSIoBGnVVZ%2FLW%2B%2Bs1M%3D&reserved=0" originalsrc="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" shash="ZkcIYkJbRfGd4jznocnPnfItjeB8taYNLL3WrZDC4NGsF9YWU5JPhaoGYIk3+YWjGhYk2JDv8miz5jJA9gzOViDIjHfv1udZoZrkTCSautVuMlsAAeVTGdKip3bj+nFRulGzo6LFX5tzgdMtLXK2HQCMP8w3QCK70xqDBC+QFXY=" originalsrc="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" shash="ylG4Sza9XvEKv/M9Ges/NWp9Z/r8qwiJ6vKd/GE2s6JpsoYslfSG0a6ABklXq5FaEgnNYx4uPMyKmNLpKWj3tzD4A3v9huVUj93gdI6nQeB4Dq80DmapAybqk48nV+t7SU9mDanH5uGzZZNNkyF8r2ErPUJlijBe7RccOvJYa1U=" target="_blank" class="">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br class="">
<a href="https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Furldefense.com%2Fv3%2F__https%3A%2F%2Fdoi.org%2F10.1371%2Fjournal.pcbi.1002202__%3B!!HJOPV4FYYWzcc1jazlU!5Elnov9n-jvdLZPJJ37SCY8838Vwb8g8vIJRVIkVY7LptSOmvV34t0KzX4srA9AfkpIhoWGHJfaHl0EV3aOz5ftlbI0xDb1XBiTiPA%24&data=05%7C02%7Cfieldtrip%40science.ru.nl%7C6d475665c2cc4e85d8d808dc73db1fe4%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638512632212798218%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=CLdGa6gFZeFnX3t3ZCqDUV0roLqlDmbxGXFZ8d8OIn8%3D&reserved=0" originalsrc="https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!5Elnov9n-jvdLZPJJ37SCY8838Vwb8g8vIJRVIkVY7LptSOmvV34t0KzX4srA9AfkpIhoWGHJfaHl0EV3aOz5ftlbI0xDb1XBiTiPA$" shash="xnaeZhBjheq5pFJdQ56lNX5hS3u5yjfV62JR8ZmFAK+jJABqohStiiH20jVtI8UpYdgSSczr+TbfQJn4E9rhW8Uh24CHM0/AY0FltcZatKR5CV5BiNNvzuhwjBBjzTN+CMZxWvN8YJIKs7RriagYUyHVAy2mp/qu9dAAc/GfP0M=" originalsrc="https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!5Elnov9n-jvdLZPJJ37SCY8838Vwb8g8vIJRVIkVY7LptSOmvV34t0KzX4srA9AfkpIhoWGHJfaHl0EV3aOz5ftlbI0xDb1XBiTiPA$" shash="YAd9rQ+zCj25eOsb6jHr6wUhPBkxeBRuSzoOHe7/XZtJspEmcZBLfb52pD5G2OI35h9NqnScz0h8UbFHX3zL6s/1J1z3xALEXdtz2AxoxRM8pWPQM4hFhbqotE7fYFpMgh0xPv/0N0/9n+h9zeui1RdQ++04X06WYfaGhGvuhl0=" target="_blank" class="">https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!5Elnov9n-jvdLZPJJ37SCY8838Vwb8g8vIJRVIkVY7LptSOmvV34t0KzX4srA9AfkpIhoWGHJfaHl0EV3aOz5ftlbI0xDb1XBiTiPA$</a>
<br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
_______________________________________________<br class="">
fieldtrip mailing list<br class="">
<a href="https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.science.ru.nl%2Fmailman%2Flistinfo%2Ffieldtrip&data=05%7C02%7Cfieldtrip%40science.ru.nl%7C6d475665c2cc4e85d8d808dc73db1fe4%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638512632212798218%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=QSd8Wt481EUyJoQ6W3SpCgOElkSIoBGnVVZ%2FLW%2B%2Bs1M%3D&reserved=0" originalsrc="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" shash="ZkcIYkJbRfGd4jznocnPnfItjeB8taYNLL3WrZDC4NGsF9YWU5JPhaoGYIk3+YWjGhYk2JDv8miz5jJA9gzOViDIjHfv1udZoZrkTCSautVuMlsAAeVTGdKip3bj+nFRulGzo6LFX5tzgdMtLXK2HQCMP8w3QCK70xqDBC+QFXY=" originalsrc="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" shash="UQqyRpxdNEmM6m0DT4cKYpVlQfOlsCXlWtTE3iaEwc6ceuLO7sj9ZnU5oTOvESlGCDOXb0f4G8wuTyI1HubGnAVv6+gAw/ZfGYR/EbMGdQqt/VUMHqJKLZuM+lBqa8wL+BkR8S8GVeFgjr68YUfHzPEMqMkUEyj/zu3OFOkDSCg=" rel="noreferrer" target="_blank" class="">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br class="">
<a href="https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdoi.org%2F10.1371%2Fjournal.pcbi.1002202&data=05%7C02%7Cfieldtrip%40science.ru.nl%7C6d475665c2cc4e85d8d808dc73db1fe4%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638512632212798218%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=qTMYhvgp9aE2cU7uterUIyG%2BBr5v2bmT6BsdVcCWTOQ%3D&reserved=0" originalsrc="https://doi.org/10.1371/journal.pcbi.1002202" shash="ktU9CluK3uK718LyzJYxRMsHcl9UaxWfRLRndsds74QeQcIgNR8uQcbKqrk5Xn0tJYt6c6IgE6NX7hfK8NwenxB5vaLBsXeOxqC1G4RgV8GFZ+pnByfPuig8OYcJh+fJxf86oP5E+GCS+yBKPN/hCCRt5SqTj8gWckVWXNhjJBY=" originalsrc="https://doi.org/10.1371/journal.pcbi.1002202" shash="PZgSh0Ci0QptuiUHT7fhKPNUXPUayNmDjDSlWRTscyqDrxNPJiwEvtR/qv7gsGa3+A9TUVgVWZnvDtEsaDKatJB+lEAvIfkV32cnOniHF+gJLRXG4mPIqn2DvbfnUhj21OxOClkq6bnjt097TWjjOqy5R4pYS8Quyv9/b8Hwqkw=" rel="noreferrer" target="_blank" class="">https://doi.org/10.1371/journal.pcbi.1002202</a><br class="">
</blockquote>
</div>
_______________________________________________<br class="">
fieldtrip mailing list<br class="">
<a href="https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.science.ru.nl%2Fmailman%2Flistinfo%2Ffieldtrip&data=05%7C02%7Cfieldtrip%40science.ru.nl%7C6d475665c2cc4e85d8d808dc73db1fe4%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638512632212954486%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=x0vraa%2FqDx1M2UyXAj42UCvt3uPsJ4OAdX7T3eDxPJo%3D&reserved=0" originalsrc="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" shash="h1sqn1zf6eOPdShdWmD4spmVJLoUjwHmS3T9guZXFGyYP7cxC4N+gAMOBKIr8QIoMwHbXAjsiLzDGowsfenRbquHezAbwJVviiauGzs2ED0/NEgPLL6moEkk/pK6UlqgRhrpYpQ8+Eo3IrGmuFDPUp/4CAzvk5vPMNEJgr4v8VA=" class="">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br class="">
https://doi.org/10.1371/journal.pcbi.1002202<br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
</body>
</html>