<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
Dear community,</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
My name is Maria den Hartog and I am a PhD candidate at the Centre for Language Studies (CLS) at Radboud University in Nijmegen. I am currently preprocessing data from an ERP reading experiment about the processing of pronouns of address (e.g. he, she, they)
within a text. </div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
I want to use automatic artifact rejection to remove full trials with signal exceeding +-100 µV as part of my preprocessing pipeline, but I get an error message indicating that 'some of the requested samples occur twice in the data and have conflicting values'.
This is true, and it is a consequence of the naturalistic reading paradigm I used. My trials run from -200 ms prestimulus to 1000 ms poststimulus. The t = 0 of each trial is the onset of a pronoun within a text, and the pronouns can occur less than 1000 ms
after each other (e.g., the stimuli are <b>he </b>and <b>his </b>in '<b>He</b> looked at
<b>his </b>cat.'). I have baselined my trials to the 200 ms window up to the stimulus, meaning the same sample can have different values in different trials.</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
The code I use for artifact rejection is:</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<div class="rtcContent" style="padding:30px"><span class="lineNode" style="font-size:10pt; font-family:Menlo,Monaco,Consolas,"Courier New",monospace; font-weight:normal"><span><span class="ContentPasted2"> cfg = [];</span></span></span>
<div class="lineNode" style="font-size:10pt; font-family:Menlo,Monaco,Consolas,"Courier New",monospace; font-weight:normal">
<span><span class="ContentPasted2"> cfg.continuous = </span><span class="ContentPasted2" style="color: rgb(167, 9, 245);">'no'</span><span class="ContentPasted2">;</span></span></div>
<div class="lineNode" style="font-size:10pt; font-family:Menlo,Monaco,Consolas,"Courier New",monospace; font-weight:normal">
<span><span class="ContentPasted2"> cfg.artfctdef.threshold.min = -100;</span></span></div>
<div class="lineNode" style="font-size:10pt; font-family:Menlo,Monaco,Consolas,"Courier New",monospace; font-weight:normal">
<span><span class="ContentPasted2"> cfg.artfctdef.threshold.max = 100;</span></span></div>
<div class="lineNode" style="font-size:10pt; font-family:Menlo,Monaco,Consolas,"Courier New",monospace; font-weight:normal">
<span><span class="ContentPasted2"> art = ft_artifact_threshold(cfg,data);</span></span></div>
<div class="lineNode" style="font-size:10pt; font-family:Menlo,Monaco,Consolas,"Courier New",monospace; font-weight:normal">
<span><span class="ContentPasted2"> </span></span></div>
<div class="lineNode" style="font-size:10pt; font-family:Menlo,Monaco,Consolas,"Courier New",monospace; font-weight:normal">
<span><span class="ContentPasted2"> cfg = [];</span></span></div>
<div class="lineNode" style="font-size:10pt; font-family:Menlo,Monaco,Consolas,"Courier New",monospace; font-weight:normal">
<span><span class="ContentPasted2"> cfg.artfctdef.xxx.artifact = art.artfctdef.threshold.artifact;</span></span></div>
<span class="lineNode" style="font-size:10pt; font-family:Menlo,Monaco,Consolas,"Courier New",monospace; font-weight:normal"><span><span class="ContentPasted2"> data_forERP = ft_rejectartifact(cfg,data);</span></span></span></div>
The error I get:</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
</div>
Error using ft_fetch_data
<div class="ContentPasted1">some of the requested samples occur twice in the data and have conflicting values</div>
<div><br class="ContentPasted1">
</div>
<div class="ContentPasted1">Error in ft_artifact_threshold (line 186)</div>
<div class="ContentPasted1"> dat = ft_fetch_data(data, 'header', hdr, 'begsample', trl(trlop,1), 'endsample', trl(trlop,2), 'chanindx', chanindx, 'checkboundary', strcmp(cfg.continuous, 'no'));</div>
<div class="elementToProof ContentPasted0" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
Is there a way to adjust the cfg for ft_rejectartifact so that the function will accept that samples do indeed occur twice in the data and that the same sample can have different values in different trials (and data from the correct trial will be fetched)?</div>
<div class="elementToProof ContentPasted0" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof ContentPasted0" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
Here are a few solutions that I have tried based on other discussion list questions, that I have found to be unsatisfactory or ineffective:</div>
<div class="elementToProof ContentPasted0" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<ul data-editing-info="{"orderedStyleType":1,"unorderedStyleType":1}">
<li style="list-style-type:disc">For ft_databrowser, it is possible to use cfg.allowoverlap = 'yes' to avoid errors due to conflicting sample values, but this setting is not available for ft_rejectartifact.</li><li style="list-style-type:disc">I do not want to remove or adjust the sampleinfo from the data, because I want to be able to relate trials to the original samples if necessary.</li><li style="list-style-type:disc">I have found that downsampling my signal will lead ft_rejectartifact to reconstruct the sampleinfo assuming that the trials are consecutive segments of a continuous recording, but I do not want to 'hack' my way around the problem
in this way.</li></ul>
</div>
<div class="elementToProof">
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
Hope you can help me out!</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
Best,</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
Maria</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="Signature">
<div>
<div class="WordSection1">
<p class="MsoNormal" style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px">
<span style="font-size: 10pt; color: black;">------------------------------------------------------------------------</span></p>
<p class="MsoNormal" style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px">
<span style="font-size: 10pt; color: black;">Maria den Hartog, MSc | PhD Candidate | Radboud University </span></p>
<p class="MsoNormal" style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px">
<span style="font-size: 10pt; color: black;">Centre for Language Studies | Grammar and Cognition<br>
Working days: Tuesday - Friday | Erasmus Building, Room 8.01</span></p>
<p class="MsoAutoSig" style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px">
</p>
</div>
</div>
</div>
</div>
</body>
</html>