<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
h1
        {mso-style-priority:9;
        mso-style-link:"Überschrift 1 Zchn";
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:24.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Vorformatiert Zchn";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.E-MailFormatvorlage18
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.HTMLVorformatiertZchn
        {mso-style-name:"HTML Vorformatiert Zchn";
        mso-style-priority:99;
        mso-style-link:"HTML Vorformatiert";
        font-family:"Courier New";
        mso-fareast-language:DE;}
span.berschrift1Zchn
        {mso-style-name:"Überschrift 1 Zchn";
        mso-style-priority:9;
        mso-style-link:"Überschrift 1";
        font-family:"Times New Roman",serif;
        mso-fareast-language:DE;
        font-weight:bold;}
span.E-MailFormatvorlage22
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:633949877;
        mso-list-template-ids:2002932920;}
@list l0:level1
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:36.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l0:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:72.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:"Courier New";
        mso-bidi-font-family:"Times New Roman";}
@list l0:level3
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:108.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l0:level4
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:144.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l0:level5
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:180.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l0:level6
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:216.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l0:level7
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:252.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l0:level8
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:288.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l0:level9
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:324.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="DE" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal" style="line-height:12.0pt;mso-line-height-rule:exactly"><span lang="EN-US" style="color:#1F497D">Dear all,<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;mso-line-height-rule:exactly"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;mso-line-height-rule:exactly"><span lang="EN-US" style="color:#1F497D">does anyone know if ft_resampledata is affecting EEG-data in an adverse manner?<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;mso-line-height-rule:exactly"><span lang="EN-US" style="color:#1F497D">I’m asking because I’m having a similar problem wich was already described by Alexandrina Guran on Mon Mar 27 11:34:19 CEST 2017 (subject:
 Problem with downsampling / automatic artifact rejection) and wanted to ask if a solution has been found why this problem appears?<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;mso-line-height-rule:exactly"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;mso-line-height-rule:exactly"><span lang="EN-US" style="color:#1F497D">The problem (black and bold) occurs while using the function ft_artifact_threshold:<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;mso-line-height-rule:exactly"><span lang="EN-US" style="color:#1F497D">Example:
<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;mso-line-height-rule:exactly"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">Warning: the trial definition in the configuration is inconsistent with the actual data
<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;mso-line-height-rule:exactly"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">Warning: reconstructing sampleinfo by assuming that the trials are consecutive segments of a<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;mso-line-height-rule:exactly"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">continuous recording
<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;mso-line-height-rule:exactly"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">threshold artifact scanning: trial 1 from 74 exceeds min-threshold<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;mso-line-height-rule:exactly"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">threshold artifact scanning: trial 2 from 74 is ok<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;mso-line-height-rule:exactly"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">threshold artifact scanning: trial 3 from 74 is ok<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;mso-line-height-rule:exactly"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">threshold artifact scanning: trial 4 from 74 is ok<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;mso-line-height-rule:exactly"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">threshold artifact scanning: trial 5 from 74 exceeds min-threshold<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;mso-line-height-rule:exactly"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">threshold artifact scanning: trial 6 from 74 exceeds max-threshold<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;mso-line-height-rule:exactly"><b><u><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New"">Warning: data contains NaNs, no filtering or preprocessing applied<o:p></o:p></span></u></b></p>
<p class="MsoNormal" style="line-height:12.0pt;mso-line-height-rule:exactly"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;mso-line-height-rule:exactly"><span lang="EN-US" style="color:#1F497D">I have backtracked why theses NANs occour, and it happens when ft_artifact_threshold (line 160) calls the function ft_fetch data. Within this
 function (line 167) the Matlab function unique is called. The Warning is posted when the variable utrl stays empty (line 169). Then in line 178 the data (variable dat), which until then are NANs, in the matrix data.trial are not converted into proper values.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">167 - utrl = unique(trialnum);</span><span lang="EN-US" style="font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">168 -  utrl(~isfinite(utrl)) = 0;</span><span lang="EN-US" style="font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">169 - 
<span style="background:yellow;mso-highlight:yellow">utrl(utrl==0) = [];</span></span><span lang="EN-US" style="font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">170 - 
</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:blue">if</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black"> length(utrl)==1</span><span lang="EN-US" style="font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">171 -    ok   = trialnum==utrl;</span><span lang="EN-US" style="font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">172 -    smps = samplenum(ok);</span><span lang="EN-US" style="font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">173 -    dat(:,ok) = data.trial{utrl}(chanindx,smps);</span><span lang="EN-US" style="font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">174 - 
</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:blue">else</span><span lang="EN-US" style="font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">175 -   
</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:blue">for</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black"> xlop=1:length(utrl)</span><span lang="EN-US" style="font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">176 -      ok   = trialnum==utrl(xlop);</span><span lang="EN-US" style="font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">177 -      smps = samplenum(ok);</span><span lang="EN-US" style="font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">178 -     
<span style="background:yellow;mso-highlight:yellow">dat(:,ok) = data.trial{utrl(xlop)}(chanindx,smps);</span></span><span lang="EN-US" style="font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">179 -   
</span><span style="font-size:10.0pt;font-family:"Courier New";color:blue">end</span><span style="font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black">180 - 
</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:blue">end</span><span lang="EN-US" style="font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">This problem is independent of my cfg configurations for ft_artifact threshold. However, as Alexandrina found out, it
 does not appear when I leave out my previous ft_resampledata step. <o:p></o:p></span></p>
<p class="MsoNormal"><u><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">So my question is</span></u><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">:
 Can anybody explain, why resampling my data is giving this effect? And additionally if it is save to use resampling anyway (other ft functions as databrowser or rejectvisual do not seem to be affected by this resampling step – but maybe I just don’t notice
 that?).<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">I’m using the EGI system with a 256 EEG cap.
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Here are my current steps before I call ft_artifact_threshold:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Definetrial:<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black;mso-fareast-language:EN-US">cfg = [];</span><span lang="EN-US" style="font-family:"Courier New";mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black;mso-fareast-language:EN-US">cfg.dataformat =
</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#A020F0;mso-fareast-language:EN-US">'egi_mff_v2'</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black;mso-fareast-language:EN-US">; 
</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:forestgreen;mso-fareast-language:EN-US">%uses the new format for egi files</span><span lang="EN-US" style="font-family:"Courier New";mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black;mso-fareast-language:EN-US">cfg.headerformat =
</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#A020F0;mso-fareast-language:EN-US">'egi_mff_v2'</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black;mso-fareast-language:EN-US">;</span><span lang="EN-US" style="font-family:"Courier New";mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black;mso-fareast-language:EN-US">cfg.eventformat =
</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#A020F0;mso-fareast-language:EN-US">'egi_mff_v2'</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black;mso-fareast-language:EN-US">;</span><span lang="EN-US" style="font-family:"Courier New";mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black;mso-fareast-language:EN-US">cfg.continuous =
</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#A020F0;mso-fareast-language:EN-US">'yes'</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black;mso-fareast-language:EN-US">;</span><span lang="EN-US" style="font-family:"Courier New";mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black;mso-fareast-language:EN-US">cfg.trialfun = 
</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#A020F0;mso-fareast-language:EN-US">'ft_trialfun_general'</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black;mso-fareast-language:EN-US">;</span><span lang="EN-US" style="font-family:"Courier New";mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black;mso-fareast-language:EN-US">cfg.trialdef.eventtype = DIN4;
</span><span style="font-family:"Courier New";mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black;mso-fareast-language:EN-US">cfg.trialdef.eventvalue =
</span><span style="font-size:10.0pt;font-family:"Courier New";color:#A020F0;mso-fareast-language:EN-US">''</span><span style="font-size:10.0pt;font-family:"Courier New";color:black;mso-fareast-language:EN-US">;
</span><span style="font-size:10.0pt;font-family:"Courier New";color:forestgreen;mso-fareast-language:EN-US">% necessary for mff files.
</span><span style="font-family:"Courier New";mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black;mso-fareast-language:EN-US">cfg.trialdef.prestim = 1;<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black;mso-fareast-language:EN-US">cfg.trialdef.poststim = 2,5;<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black;mso-fareast-language:EN-US">EEG_trldef_S1= ft_definetrial(cfg)</span><span lang="EN-US" style="font-family:"Courier New";mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-family:"Courier New";mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">2x times Selectdata:<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black;mso-fareast-language:EN-US">cfg.trials = keep_trlinf</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:forestgreen;mso-fareast-language:EN-US">;%
 specific rules for my experiment</span><span lang="EN-US" style="font-family:"Courier New";mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black;mso-fareast-language:EN-US">EEG_trls= ft_selectdata(cfg, EEG_trldef_S1);</span><span lang="EN-US" style="font-family:"Courier New";mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-family:"Courier New";mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Preprocessing:<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black;mso-fareast-language:EN-US">EEG_trls.padding = Pad;</span><span lang="EN-US" style="font-family:"Courier New";mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black;mso-fareast-language:EN-US">EEG_trls.chantype = {</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#A020F0;mso-fareast-language:EN-US">'eeg'</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black;mso-fareast-language:EN-US">};</span><span lang="EN-US" style="font-family:"Courier New";mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black;mso-fareast-language:EN-US">EEG_trls.channel=(1:257);
</span><span lang="EN-US" style="font-family:"Courier New";mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black;mso-fareast-language:EN-US">EEG_trls.detrend =
</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#A020F0;mso-fareast-language:EN-US">'yes'</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black;mso-fareast-language:EN-US">;<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black;mso-fareast-language:EN-US">EEG_trls.trials  =
</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#A020F0;mso-fareast-language:EN-US">'all'</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black;mso-fareast-language:EN-US">;
</span><span lang="EN-US" style="font-family:"Courier New";mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black;mso-fareast-language:EN-US">EEG_trls.lpfilter =</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#A020F0;mso-fareast-language:EN-US">'yes'</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black;mso-fareast-language:EN-US">;</span><span lang="EN-US" style="font-family:"Courier New";mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black;mso-fareast-language:EN-US">EEG_trls.lpfreq = 60;   </span><span style="font-family:"Courier New";mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black;mso-fareast-language:EN-US">EEG_preproc_1000Hz = ft_preprocessing (EEG_trls);</span><span lang="EN-US" style="font-family:"Courier New";mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:forestgreen;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Resample data<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black;mso-fareast-language:EN-US">cfg.resamplefs = 500;
</span><span lang="EN-US" style="font-family:"Courier New";mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:black;mso-fareast-language:EN-US">EEG_preproc = ft_resampledata(cfg, EEG_preproc_1000Hz);</span><span lang="EN-US" style="font-family:"Courier New";mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">The difference between the data output of ft_preprocessing and ft_resampledata is that the variable sampleinfo is missing after ft_resampledata (see attached picture). Maybe this is the reason why
 ft_artifact_threshold is not working properly?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">I hope someone has an explanation? Thank you in advance,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Alexandra</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma",sans-serif;color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;mso-line-height-rule:exactly"><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma",sans-serif;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;mso-line-height-rule:exactly"><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma",sans-serif;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;mso-line-height-rule:exactly"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">_________________________________________________________________<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;mso-line-height-rule:exactly"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;mso-line-height-rule:exactly"><span style="font-size:10.0pt;font-family:"Calibri",sans-serif;color:black">Alexandra Korzeczek<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;mso-line-height-rule:exactly"><span style="font-size:10.0pt;font-family:"Calibri",sans-serif;color:black">Wissenschaftliche Mitarbeiterin<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;mso-line-height-rule:exactly"><span style="font-size:10.0pt;font-family:"Calibri",sans-serif;color:black">Klinik für Klinische Neurophysiologie
<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;mso-line-height-rule:exactly"><span style="font-size:10.0pt;font-family:"Calibri",sans-serif;color:black">Georg-August-Universität Göttingen<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;mso-line-height-rule:exactly"><span style="font-size:10.0pt;font-family:"Calibri",sans-serif;color:black">Robert-Koch.Str. 40, 37075 Göttingen<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;mso-line-height-rule:exactly"><span style="font-size:10.0pt;font-family:"Calibri",sans-serif;color:black">Tel. 0551- 39-65106<o:p></o:p></span></p>
</div>
</body>
</html>