<div dir="ltr">I just select part of the signal and it's color changed to the pink. Is it true or I should do extra action?<div><br></div><div>Best wishes,</div><div>Erfan-Vajdi</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, May 14, 2024 at 9:32 AM Schoffelen, J.M. (Jan Mathijs) via fieldtrip <<a href="mailto:fieldtrip@science.ru.nl">fieldtrip@science.ru.nl</a>> wrote:<br></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;">
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><br>
</div>
<div>Best wishes,</div>
<div>Jan-Mathijs<br>
<div>
<div><br>
<blockquote type="cite">
<div>On 5 May 2024, at 20:33, Erfan Vi via fieldtrip <<a href="mailto:fieldtrip@science.ru.nl" target="_blank">fieldtrip@science.ru.nl</a>> wrote:</div>
<br>
<div>
<div dir="ltr">Hi Jan Mathijs,
<div><br>
<div>Hello, I apologize for the late reply<br>
I corrected the spelling mistake but it didn't make any difference<br>
</div>
<div><br>
</div>
<div>Best wishes,<br>
</div>
<div>Erfan</div>
</div>
</div>
<br>
<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" target="_blank">fieldtrip@science.ru.nl</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>Hi Erfan,
<div><br>
</div>
<div>Could it be that there is a typo here?</div>
<div><br>
</div>
<div>
<blockquote type="cite">
<div dir="ltr">
<div>cfg.artifactdef = cfg_artfctdef -> cfg.artfctdef = cfg_artfctdef;</div>
</div>
</blockquote>
<div><br>
</div>
Best wishes,</div>
<div>Jan-Mathijs<br>
<div><br>
<blockquote type="cite">
<div>On 24 Jul 2023, at 08:43, Erfan Vi via fieldtrip <<a href="mailto:fieldtrip@science.ru.nl" target="_blank">fieldtrip@science.ru.nl</a>> wrote:</div>
<br>
<div>
<div dir="ltr">Dear FieldTrip users,
<div>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" 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">
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://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" 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 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>
_______________________________________________<br>
fieldtrip mailing list<br>
<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" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<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" target="_blank">https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!5Elnov9n-jvdLZPJJ37SCY8838Vwb8g8vIJRVIkVY7LptSOmvV34t0KzX4srA9AfkpIhoWGHJfaHl0EV3aOz5ftlbI0xDb1XBiTiPA$</a>
<br>
</div>
</blockquote>
</div>
<br>
</div>
</div>
_______________________________________________<br>
fieldtrip mailing list<br>
<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" rel="noreferrer" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<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" rel="noreferrer" target="_blank">https://doi.org/10.1371/journal.pcbi.1002202</a><br>
</blockquote>
</div>
_______________________________________________<br>
fieldtrip mailing list<br>
<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" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<a href="https://doi.org/10.1371/journal.pcbi.1002202" target="_blank">https://doi.org/10.1371/journal.pcbi.1002202</a><br>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div>

_______________________________________________<br>
fieldtrip mailing list<br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<a href="https://doi.org/10.1371/journal.pcbi.1002202" rel="noreferrer" target="_blank">https://doi.org/10.1371/journal.pcbi.1002202</a><br>
</blockquote></div>