<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Dear Fieldtrippers, <div class=""><br class=""></div><div class="">Just a follow-up email to know if someone already got this problem of « Invisible trials » after downsampling and has an idea about how to solve the problem.</div><div class=""><br class=""></div><div class="">Kind regards, </div><div class=""><br class=""></div><div class="">Emilie</div><div class=""><br class=""></div><div class=""><img apple-inline="yes" id="B0F10B12-E12A-4A39-95C8-76FB9DDCB139" src="cid:2E7F0EFE-DE20-4E77-9C49-5BCF7D41613A@crcn.ulb.ac.be" class=""><br class=""><div class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="text-align: start; text-indent: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="text-align: start; text-indent: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="text-align: start; text-indent: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="text-align: start; text-indent: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="text-align: start; text-indent: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="text-align: start; text-indent: 0px;"><p class="MsoNormal" style="margin-bottom: 6pt;"><span style="font-size: 10pt; font-family: Helvetica; color: black;" class="">---------------------------------------------<br class=""></span><b class=""><span style="font-size: 10pt; color: rgb(39, 136, 214);" class="">Emilie CASPAR</span></b></p><p class="MsoNormal"><b class=""><span style="font-size: 9pt; font-family: Helvetica; color: black;" class="">Associate Professor<span class="Apple-converted-space"> </span><o:p class=""></o:p></span></b></p><p class="MsoNormal"><span lang="EN-US" style="font-size: 9pt; font-family: Helvetica; color: black;" class="">Department of Experimental Psychology, Ghent University<br class="">office: Henri Dunantlaan, 2 - Floor 2, Room 94<o:p class=""></o:p></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size: 9pt; font-family: Helvetica; color: black;" class="">lab’s website: </span><span style="font-size: 9pt; font-family: Helvetica; color: black;" class=""><a href="https://moralsocialbrain.com/" class=""><span lang="EN-US" style="color: blue;" class="">https://moralsocialbrain.com/</span></a></span><span lang="EN-US" style="font-size: 9pt; font-family: Helvetica; color: black;" class=""> <br class="">personal website: </span><span style="font-size: 9pt; font-family: Helvetica; color: black;" class=""><a href="https://emiliecaspar.home.blog/" class=""><span lang="EN-US" style="color: blue;" class="">https://emiliecaspar.home.blog/</span></a></span><span lang="EN-US" style="font-size: 9pt; font-family: Helvetica; color: black;" class=""><o:p class=""></o:p></span></p><p class="MsoNormal" style="font-size: 12px;"></p><p class="MsoNormal"><span style="font-size: 9pt; font-family: Helvetica; color: black;" class="">Université libre de Bruxelles (office & contact): DB10.138 / +32 2 650 32 95<o:p class=""></o:p></span></p></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">Le 21 oct. 2021 à 14:40, Emilie Caspar via fieldtrip <<a href="mailto:fieldtrip@science.ru.nl" class="">fieldtrip@science.ru.nl</a>> a écrit :</div><br class="Apple-interchange-newline"><div class="">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Dear fieldtrippers, <div class=""><br class=""></div><div class="">I am trying to downsample my EEG data, originally recorded at 2048 Hz.</div><div class=""><br class=""></div><div class="">I run the following code:</div><div class=""><br class=""></div><div class=""><div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">    cfg = [];</div><div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier; color: rgb(37, 153, 45);"><span class="" style="">    </span>%cfg.channel = {'A1', 'B2', 'A5', 'B5', 'B6', 'B8', 'A15', 'B20', 'B15', 'B16', 'A13', 'B18', 'A27', 'A28', 'A31', 'A29', 'A30', 'A32', 'B32', 'A21', 'A31', 'B26', 'EXG1', 'EXG2', 'EXG3', 'EXG4'}%'B15';</div><div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">    cfg.dataset    = [ file.name];</div><div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">    cfg.bpfilter    = <span class="" style="color: rgb(178, 69, 243);">'yes'</span>;</div><div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">    cfg.bpfreq      = bpfilterRange;</div><div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">    cfg.bpfiltord   = bpfilterOrder;</div><div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">    cfg.reref       = <span class="" style="color: rgb(178, 69, 243);">'yes'</span>;</div><div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">    cfg.refchannel  = chansRef;</div><div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">    allData_preprosses = ft_preprocessing(cfg);</div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier; min-height: 12px;" class="">    <br class="webkit-block-placeholder"></div><div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">    cfg = [];</div><div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">    cfg.resamplefs = 512;</div><div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">    data_DS = ft_resampledata(cfg, allData_preprosses);</div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier; min-height: 12px;" class="">    <br class="webkit-block-placeholder"></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier; min-height: 12px;" class="">    <br class="webkit-block-placeholder"></div><div class="">When I look at individual trials for artefact rejection, something very weird happens. Basically some trials become ‘invisible’ (sorry, I don’t find any other way to describe it), see figure attached. It seems that the data do exit though because when I average my visible trials to the invisible ones, it results in an invisible ERPs graph. But when I remove the trials containing the invisible data, an ERP graph does appear (please don’t pay attention to the quality of the data, this is just an example without any cleaning).</div><div class=""><br class=""></div><div class="">It seems there is a logic to the phenomenon, because if I downsample to 1024Hz (so half of my initial 2048 Hz), only half of my data becomes invisible and if I downsample to 512Hz, a 3/4 of the data becomes invisible.</div><div class=""><br class=""></div><div class="">I have tried the same with a different coding, with this time downsampling before filtering as follows, but the output is exactly the same.</div><div class=""><br class=""></div><div class=""><div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier; color: rgb(178, 69, 243);"><span class="" style="">display(</span>'downsample each channel'<span class="" style="">)</span></div><div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">        <span class="Apple-tab-span" style="white-space: pre;"> </span>cfgp         = [];</div><div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">                cfgp.dataset = [file.name];</div><div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">                cfgr            = [];</div><div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">                cfgr.resamplefs = 512;</div><div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">                display(<span class="" style="color: rgb(178, 69, 243);">'Resampling'</span>)</div><div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">                <span class="" style="color: rgb(4, 51, 255);">for</span> i= chansAll</div><div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">                    cfgp.channel = i;</div><div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">                    datp         = ft_preprocessing(cfgp);</div><div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">                    datr{i}      = ft_resampledata(cfgr, datp);</div><div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">                    clear <span class="" style="color: rgb(178, 69, 243);">datp</span></div><div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">                <span class="" style="color: rgb(4, 51, 255);">end</span></div><div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">                cfg = [];</div><div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">                datall = ft_appenddata(cfg, datr{:});</div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier; min-height: 12px;" class="">    <span class="" style="color: rgb(37, 153, 45);">    </span><br class="webkit-block-placeholder"></div><div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">    display(<span class="" style="color: rgb(178, 69, 243);">'Filters'</span>)</div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier; min-height: 12px;" class="">    <br class="webkit-block-placeholder"></div><div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">    cfg = [];</div><div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier; color: rgb(37, 153, 45);">    cfg.dataset    = [ file.name];</div><div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">    cfg.bpfilter    = <span class="" style="color: rgb(178, 69, 243);">'yes'</span>;</div><div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">    cfg.bpfreq      = bpfilterRange;</div><div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">    cfg.bpfiltord   = bpfilterOrder;</div><div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">    cfg.reref       = <span class="" style="color: rgb(178, 69, 243);">'yes'</span>;</div><div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">    cfg.refchannel  = chansRef;</div><div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">    data_DS = ft_preprocessing(cfg, datall);</div></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Does anyone have any idea regarding this phenomenon?</div><div class=""><br class=""></div><div class="">Thank you in advance!</div><div class=""><br class=""></div><div class="">Best regards, </div><div class=""><br class=""></div><div class="">Emilie</div><div class=""><br class=""></div><div class=""><span id="cid:B0DAD142-AB36-44AD-BE9F-44EEAF25BDD2@guest.UGent.be"><Downsampling.001.jpeg></span></div></div><div class="">
<div style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="text-align: start; text-indent: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="text-align: start; text-indent: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="text-align: start; text-indent: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="text-align: start; text-indent: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="text-align: start; text-indent: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="text-align: start; text-indent: 0px;" class=""><p class="MsoNormal" style="margin-bottom: 6pt;"><span style="font-size: 10pt; font-family: Helvetica;" class="">---------------------------------------------<br class=""></span><b class=""><span style="font-size: 10pt; color: rgb(39, 136, 214);" class="">Emilie CASPAR</span></b></p><p class="MsoNormal"><b class=""><span style="font-size: 9pt; font-family: Helvetica;" class="">Associate Professor<span class="Apple-converted-space"> </span><o:p class=""></o:p></span></b></p><p class="MsoNormal"><span lang="EN-US" style="font-size: 9pt; font-family: Helvetica;" class="">Department of Experimental Psychology, Ghent University<br class="">office: Henri Dunantlaan, 2 - Floor 2, Room 94<o:p class=""></o:p></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size: 9pt; font-family: Helvetica;" class="">lab’s website: </span><span style="font-size: 9pt; font-family: Helvetica;" class=""><a href="https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmoralsocialbrain.com%2F&data=04%7C01%7Cemilie.caspar%40ulb.be%7C9eaa583fc9f2496f3d9708d99494a638%7C30a5145e75bd4212bb028ff9c0ea4ae9%7C0%7C0%7C637704188432821811%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=X9emmQ51jam6Zr%2FzU1ntTu4F%2FAWsPVUwbwMPtsxLOhw%3D&reserved=0" originalsrc="https://moralsocialbrain.com/" shash="j+4G/iEoSWQCxeIs9tpi4EHM0NWrIpzVkayxifgVql3pc2gQWsQ/xurGLZ25Tnfw3iozXyNszOvG3eWdqPOS+OjGN5WYNsRKB3mEMS1glKp16TiJsyO4c5sZx9rXX5OKN17cLNoRt0oJgk2lbl22cbii8nWFLydgoaAztVtoHKM=" class=""><span lang="EN-US" style="color: blue;" class="">https://moralsocialbrain.com/</span></a></span><span lang="EN-US" style="font-size: 9pt; font-family: Helvetica;" class=""> <br class="">personal website: </span><span style="font-size: 9pt; font-family: Helvetica;" class=""><a href="https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Femiliecaspar.home.blog%2F&data=04%7C01%7Cemilie.caspar%40ulb.be%7C9eaa583fc9f2496f3d9708d99494a638%7C30a5145e75bd4212bb028ff9c0ea4ae9%7C0%7C0%7C637704188432831766%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=RSBTcOxejkzdWKA9QOyJZKXBD%2F5bGyFC12%2FKCpKl8GY%3D&reserved=0" originalsrc="https://emiliecaspar.home.blog/" shash="ilCtuIRioBXGTOiwIRtcHSoq43qFbUnZ8vv9H2dB5XAwzLhRIVRq1jZpc5C6fY/R5vyMfwzG3gOguryzKL82H+MU6wJ+mzjRP5/o0cL1KsqnA06IjW1yZPJZOcegqSi0NSrekQyQN6PSDBrkyj5gUr72DodCJYS6QBNKrOJFrKc=" class=""><span lang="EN-US" style="color: blue;" class="">https://emiliecaspar.home.blog/</span></a></span><span lang="EN-US" style="font-size: 9pt; font-family: Helvetica;" class=""><o:p class=""></o:p></span></p><div style="font-size: 12px;" class=""><br class="webkit-block-placeholder"></div><p class="MsoNormal"><span style="font-size: 9pt; font-family: Helvetica;" class="">Université libre de Bruxelles (office & contact): DB10.138 / +32 2 650 32 95<o:p class=""></o:p></span></p></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</div>

<br class=""></div>_______________________________________________<br class="">fieldtrip mailing list<br class=""><a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" 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></body></html>