<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:宋体;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@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:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"Times New Roman \,serif";}
@font-face
        {font-family:"\@宋体";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        color:black;}
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 预设格式 Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        color:black;}
span.HTMLChar
        {mso-style-name:"HTML 预设格式 Char";
        mso-style-priority:99;
        mso-style-link:"HTML 预设格式";
        font-family:Consolas;
        color:black;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;}
p.HTMLPreformatted, li.HTMLPreformatted, div.HTMLPreformatted
        {mso-style-name:"HTML Preformatted";
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        color:black;}
span.EmailStyle21
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle22
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle23
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle24
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle25
        {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:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.WordSection1
        {page:WordSection1;}
--></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 bgcolor=white lang=EN-GB link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal><span style='color:#1F497D'>Hi, Jörn & Alexander. Thank you for all the explanations. </span><span style='font-family:Wingdings;color:#1F497D'>J</span><span style='color:#1F497D'><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'>Best,<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Yun<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><div><p class=MsoNormal style='text-align:justify;text-justify:inter-ideograph'><span lang=EN-US style='font-size:10.5pt;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal style='text-align:justify;text-justify:inter-ideograph'><span lang=EN-US style='font-size:10.5pt;color:#1F497D'>~*~*~*~*~*~*~*~*~*~*~*~*~<o:p></o:p></span></p><p class=MsoNormal style='text-align:justify;text-justify:inter-ideograph'><span lang=EN-US style='font-size:10.5pt;color:#1F497D'>Yun Wen<o:p></o:p></span></p><p class=MsoNormal style='text-align:justify;text-justify:inter-ideograph'><span lang=ZH-CN style='font-size:10.5pt;font-family:宋体;color:#1F497D'>温韫</span><span lang=EN-US style='font-size:10.5pt;color:#1F497D'><o:p></o:p></span></p><p class=MsoNormal style='text-align:justify;text-justify:inter-ideograph'><span lang=EN-US style='font-size:10.5pt;color:#1F497D'>PhD Candidate<o:p></o:p></span></p><p class=MsoNormal style='text-align:justify;text-justify:inter-ideograph'><span lang=EN-US style='font-size:10.5pt;color:#1F497D'>Rm A25, School of Psychology<o:p></o:p></span></p><p class=MsoNormal style='text-align:justify;text-justify:inter-ideograph'><span lang=EN-US style='font-size:10.5pt;color:#1F497D'>University of Nottingham<o:p></o:p></span></p><p class=MsoNormal style='text-align:justify;text-justify:inter-ideograph'><span lang=EN-US style='font-size:10.5pt;color:#1F497D'>University Park, NG7 2RD<o:p></o:p></span></p><p class=MsoNormal style='text-align:justify;text-justify:inter-ideograph'><span lang=EN-US style='font-size:10.5pt;color:#1F497D'>Phone: +44 [0]115 846-8129<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=FR style='color:#1F497D'>Tout finit toujours bien, si ça ne va pas, c'est que ce n'est pas la fin.<o:p></o:p></span></p></div><p class=MsoNormal><span lang=FR style='color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='color:windowtext'>From:</span></b><span style='color:windowtext'> fieldtrip-bounces@science.ru.nl [mailto:fieldtrip-bounces@science.ru.nl] <b>On Behalf Of </b>J?rn M. Horschig<br><b>Sent:</b> Monday, December 08, 2014 9:20 AM<br><b>To:</b> 'FieldTrip discussion list'<br><b>Subject:</b> Re: [FieldTrip] about detrend<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>oh and another thing: in FieldTrip, detrending inherently also demeans, or in other words, if the fitted first order polynomial is removed, also the zeroth order polynomial is.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><div><p class=MsoNormal><b><span lang=EN-US style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#626264;mso-fareast-language:NL'>--<o:p></o:p></span></b></p><p class=MsoNormal><b><span lang=EN-US style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#255A9E;mso-fareast-language:NL'><o:p> </o:p></span></b></p><p class=MsoNormal><b><span lang=EN-US style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#255A9E;mso-fareast-language:NL'>Jörn M. Horschig</span></b><span lang=EN-US style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#626264;mso-fareast-language:NL'>, Software Engineer</span><b><span lang=EN-US style='font-size:9.0pt;font-family:"Verdana",sans-serif;mso-fareast-language:NL'><o:p></o:p></span></b></p><p class=MsoNormal><a href="http://www.artinis.com/"><span lang=EN-US style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#626264;mso-fareast-language:NL'>Artinis Medical Systems</span></a><span lang=EN-US style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#626264;mso-fareast-language:NL'>  |  +31 481 350 980 </span><b><span lang=EN-US style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#255A9E;mso-fareast-language:NL'><o:p></o:p></span></b></p></div><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><div style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt'><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='color:windowtext'>From:</span></b><span lang=EN-US style='color:windowtext'> </span><a href="mailto:fieldtrip-bounces@science.ru.nl"><span lang=EN-US>fieldtrip-bounces@science.ru.nl</span></a><span lang=EN-US style='color:windowtext'> [</span><a href="mailto:fieldtrip-bounces@science.ru.nl"><span lang=EN-US>mailto:fieldtrip-bounces@science.ru.nl</span></a><span lang=EN-US style='color:windowtext'>] <b>On Behalf Of </b>Yun Wen<br><b>Sent:</b> Sunday, December 7, 2014 11:53 AM<br><b>To:</b> FieldTrip discussion list<br><b>Subject:</b> Re: [FieldTrip] about detrend<o:p></o:p></span></p></div></div><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Hi, Alexander. Thank you for your help. Do you suggest that I do baseline correction plus detrend, e,g,  cfg.blc = 'yes' & cfg.detrend = 'yes' on epoched data? <o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Best,<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Yun<o:p></o:p></span></p><div><p class=MsoNormal style='text-align:justify;text-justify:inter-ideograph'><span style='font-size:10.5pt;color:#1F497D'><o:p> </o:p></span></p></div><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 0cm 0cm 0cm'><p class=MsoNormal><b><span style='color:windowtext'>From:</span></b><span style='color:windowtext'> </span><a href="mailto:fieldtrip-bounces@science.ru.nl">fieldtrip-bounces@science.ru.nl</a><span style='color:windowtext'> [</span><a href="mailto:fieldtrip-bounces@science.ru.nl">mailto:fieldtrip-bounces@science.ru.nl</a><span style='color:windowtext'>] <b>On Behalf Of </b>Alexander Nakhnikian<br><b>Sent:</b> Saturday, December 06, 2014 1:14 AM<br><b>To:</b> FieldTrip discussion list<br><b>Subject:</b> Re: [FieldTrip] about detrend<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>It looks as though the take home message is that in theory high pass filters remove DC but you can't be sure how they will interact with empirical data since there is no perfect filter in the real world.  If other people report substantial artifacts after filtering data without removing the DC component I suggest getting rid of it.  To answer your original question, assuming you're detrending each epoch individually it should remove the DC component or at least reduce it substantially.   <br><br>I hope that helps.<br><br><br><br>On 12/5/14, 6:20 PM, Yun Wen wrote:<span style='font-size:12.0pt'><o:p></o:p></span></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal><span style='color:#1F497D'>Hi, Alexander & Rodrigo. Thank you very much for your help. I collected my data with DC recordings (BioSemi system). I have seen some discussion on the DC offset:</span><o:p></o:p></p><p class=MsoNormal><a href="http://sccn.ucsd.edu/pipermail/eeglablist/2014/008068.html">http://sccn.ucsd.edu/pipermail/eeglablist/2014/008068.html</a><o:p></o:p></p><p class=MsoNormal><a href="http://sccn.ucsd.edu/pipermail/eeglablist/2008/002229.html">http://sccn.ucsd.edu/pipermail/eeglablist/2008/002229.html</a><o:p></o:p></p><p class=MsoNormal><a href="http://sccn.ucsd.edu/pipermail/eeglablist/2010/003315.html">http://sccn.ucsd.edu/pipermail/eeglablist/2010/003315.html</a><o:p></o:p></p><p class=MsoNormal><a href="http://erpinfo.org/erplab/erplab-documentation/manual/Filtering.html">http://erpinfo.org/erplab/erplab-documentation/manual/Filtering.html</a><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'>It seems to me that I’d better remove DC offset of continuous data before high-pass filter. Am I right?</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'>Best,</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'>Yun</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> </span><o:p></o:p></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='color:windowtext'>From:</span></b><span style='color:windowtext'> </span><a href="mailto:fieldtrip-bounces@science.ru.nl">fieldtrip-bounces@science.ru.nl</a><span style='color:windowtext'> [</span><a href="mailto:fieldtrip-bounces@science.ru.nl">mailto:fieldtrip-bounces@science.ru.nl</a><span style='color:windowtext'>] <b>On Behalf Of </b>Alexander Nakhnikian<br><b>Sent:</b> Friday, December 05, 2014 10:19 PM<br><b>To:</b> FieldTrip discussion list<br><b>Subject:</b> Re: [FieldTrip] about detrend</span><o:p></o:p></p></div></div><p class=MsoNormal> <o:p></o:p></p><div><p class=MsoNormal style='margin-bottom:12.0pt'>Hello Again,<br><br>I think there's an error in my response. I think removing the linear trend should also set the mean to zero already since the best fit line incorporates vertical offset.  Sorry about that.  <br><br>A<o:p></o:p></p><pre><span style='font-size:10.0pt;font-family:"Courier New"'> <o:p></o:p></span></pre><p class=MsoNormal>On 12/5/14, 4:20 PM, Yun Wen wrote:<o:p></o:p></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal>Hi all, I want to remove DC offset before applying the high-pass filter. I  was wondering if I can achieve that by putting cfg.detrend = 'yes' before cfg.hpfilter = 'yes', something like:<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>cfg = []; <o:p></o:p></p><p class=MsoNormal>cfg.dataset = filename_raweeg;<o:p></o:p></p><p class=MsoNormal>cfg.detrend = 'yes'; <o:p></o:p></p><p class=MsoNormal>cfg.hpfilter = 'yes';<o:p></o:p></p><p class=MsoNormal>cfg.hpfiltord = 2; % Order of the filter = 2.<o:p></o:p></p><p class=MsoNormal>cfg.hpfreq = 0.1; % High-pass cutoff at 0.1 Hz;<o:p></o:p></p><p class=MsoNormal>[data] = ft_preprocessing (cfg);<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>Thank you in advance.<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>Best,<o:p></o:p></p><p class=MsoNormal>Yun<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><pre><span style='font-size:10.0pt;font-family:"Courier New"'> <o:p></o:p></span></pre><pre><span style='font-size:10.0pt;font-family:"Courier New"'> <o:p></o:p></span></pre><pre><span style='font-size:10.0pt;font-family:"Courier New"'>This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it.   Please do not use, copy or disclose the information contained in this message or in any attachment.  Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.<o:p></o:p></span></pre><pre><span style='font-size:10.0pt;font-family:"Courier New"'> <o:p></o:p></span></pre><pre><span style='font-size:10.0pt;font-family:"Courier New"'>This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation.<o:p></o:p></span></pre></blockquote><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman \,serif"'> </span><o:p></o:p></p><pre><span style='font-size:10.0pt;font-family:"Courier New"'><o:p> </o:p></span></pre><pre><span style='font-size:10.0pt;font-family:"Courier New"'><o:p> </o:p></span></pre><pre><span style='font-size:10.0pt;font-family:"Courier New"'>This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it.   Please do not use, copy or disclose the information contained in this message or in any attachment.  Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.<o:p></o:p></span></pre><pre><span style='font-size:10.0pt;font-family:"Courier New"'><o:p> </o:p></span></pre><pre><span style='font-size:10.0pt;font-family:"Courier New"'>This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation.<o:p></o:p></span></pre></blockquote><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman",serif'><o:p> </o:p></span></p><pre><span style='font-size:10.0pt;font-family:"Courier New"'><o:p> </o:p></span></pre><pre><span style='font-size:10.0pt;font-family:"Courier New"'><o:p> </o:p></span></pre><pre><span style='font-size:10.0pt;font-family:"Courier New"'><o:p> </o:p></span></pre><pre><span style='font-size:10.0pt;font-family:"Courier New"'>This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it.   Please do not use, copy or disclose the information contained in this message or in any attachment.  Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.<o:p></o:p></span></pre><pre><span style='font-size:10.0pt;font-family:"Courier New"'><o:p> </o:p></span></pre><pre><span style='font-size:10.0pt;font-family:"Courier New"'>This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation.<o:p></o:p></span></pre></div></div><PRE>


This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it.   Please do not use, copy or disclose the information contained in this message or in any attachment.  Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.

This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation.
</PRE></body></html>