<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:"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;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-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;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:1598100855;
        mso-list-type:hybrid;
        mso-list-template-ids:937043366 -1 67895321 67895323 67895311 67895321 67895323 67895311 67895321 67895323;}
@list l0:level1
        {mso-level-text:"\(%1\)";
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l1
        {mso-list-id:2079589643;
        mso-list-template-ids:914231948;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></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=EN-US link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal><span style='color:#1F497D'>Dear Marion,<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>It sounds it might indeed be something as simple as a typo. Could you paste the part of your script – from baseline removal to plotting (where you don’t see a difference) - so we can take a look?<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Cheers,<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Stephen<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b>From:</b> fieldtrip <fieldtrip-bounces@science.ru.nl> <b>On Behalf Of </b>Marion Vincent<br><b>Sent:</b> Thursday, January 17, 2019 10:37 AM<br><b>To:</b> fieldtrip@science.ru.nl<br><b>Subject:</b> [FieldTrip] Baseline removal errors in trials preprocessing<o:p></o:p></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span lang=FR>Dear FIeldtrip users, <o:p></o:p></span></p><p class=MsoNormal><span lang=FR><o:p> </o:p></span></p><p class=MsoNormal><span lang=FR>I’m new in using Fieldtrip for EEG processing and I’ve encountred some issues while removing the Baseline of my trials. <o:p></o:p></span></p><p class=MsoNormal><span lang=FR><o:p> </o:p></span></p><p class=MsoNormal><span lang=FR>I’m working on EEG signals recorded with the BioSemi system.  My pre-processing method is : <o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo3'><![if !supportLists]><span lang=FR><span style='mso-list:Ignore'>(1)<span style='font:7.0pt "Times New Roman"'>    </span></span></span><![endif]><span lang=FR>Re-referecing the channels (necessary with BioSemi)<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo3'><![if !supportLists]><span lang=FR><span style='mso-list:Ignore'>(2)<span style='font:7.0pt "Times New Roman"'>    </span></span></span><![endif]><span lang=FR>Trial definition<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo3'><![if !supportLists]><span lang=FR><span style='mso-list:Ignore'>(3)<span style='font:7.0pt "Times New Roman"'>    </span></span></span><![endif]><span lang=FR>Baseline removal<o:p></o:p></span></p><p class=MsoNormal><span lang=FR><o:p> </o:p></span></p><p class=MsoNormal><span lang=FR>I’ve read on the documentation that ft_preprocessing xcan have several cfg parameter for the Baseline removal :<o:p></o:p></span></p><p class=MsoNormal><span lang=FR><o:p> </o:p></span></p><p class=MsoNormal><span lang=FR>% cfg.demean  = 'yes';%'no' or 'yes', whether to apply baseline correction (default = 'no')<o:p></o:p></span></p><p class=MsoNormal><span lang=FR>% cfg.baselinewindow = 'all';%[begin end] ;%in seconds, the default is the complete trial (default = 'all')<o:p></o:p></span></p><p class=MsoNormal><span lang=FR>% cfg.detrend       = 'no'; %'no' or 'yes', remove linear trend from the data (done per trial) (default = 'no')<o:p></o:p></span></p><p class=MsoNormal><span lang=FR><o:p> </o:p></span></p><p class=MsoNormal><span lang=FR>I wanted to remove a Baseline defined as the average of a given window preceeding my stimulus onset. <o:p></o:p></span></p><p class=MsoNormal><span lang=FR><o:p> </o:p></span></p><p class=MsoNormal><span lang=FR>I tried to use : cfg.baselinewindow = [-0.5 0 ]; cfg.baselinewindow = [0 0.1] or the default window .<o:p></o:p></span></p><p class=MsoNormal><span lang=FR>But the problem is that I always have the same result, no matter the window I use : the first point of my trial is put to zero and substracted to all my trial. <o:p></o:p></span></p><p class=MsoNormal><span lang=FR><o:p> </o:p></span></p><p class=MsoNormal><span lang=FR>I’m sure I’m doing something wrong (and that the answer is very simple), but I can’t manage to understand what is the issue.<o:p></o:p></span></p><p class=MsoNormal><span lang=FR><o:p> </o:p></span></p><p class=MsoNormal><span lang=FR>Do you have any advice ?<o:p></o:p></span></p><p class=MsoNormal><span lang=FR><o:p> </o:p></span></p><p class=MsoNormal><span lang=FR>Thanks ! <o:p></o:p></span></p><p class=MsoNormal><span lang=FR>Marion<o:p></o:p></span></p><p class=MsoNormal><span lang=FR><o:p> </o:p></span></p><p class=MsoNormal style='margin-bottom:12.0pt'><b><span lang=FR style='color:#2F5597'>Marion VINCENT</span></b><span lang=FR style='color:black'><br>Eng., PhD , CNRS Research Engineer<br><br></span><span lang=FR><o:p></o:p></span></p><p class=MsoNormal><span lang=FR><o:p> </o:p></span></p></div></body></html>