<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)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><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;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        color:black;
        mso-fareast-language:EN-US;}
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 Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        color:black;
        mso-fareast-language:EN-US;}
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:11.0pt;
        font-family:"Calibri",sans-serif;
        color:black;}
span.EmailStyle20
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Consolas",serif;
        color:black;
        mso-fareast-language:EN-US;}
span.EmailStyle23
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:297877924;
        mso-list-type:hybrid;
        mso-list-template-ids:-1835905240 1141440529 1141440537 1141440539 1141440527 1141440537 1141440539 1141440527 1141440537 1141440539;}
@list l0:level1
        {mso-level-text:"%1\)";
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@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:-18.0pt;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@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:-18.0pt;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@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:482163072;
        mso-list-template-ids:1125289324;}
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 bgcolor="white" lang="EN-MY" link="#0563C1" vlink="#954F72"><p><span style="padding: 3px 10px; border-radius: 5px; color: #ffffff; font-weight: bold; display: inline-block; background-color: #ff0000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;External Email - Use Caution&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></p><p></p>
<div class="WordSection1">
<p class="MsoNormal"><span style="color:windowtext">Dear Phillip,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext">Thanks for the response,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext">Just wonder whether there exist different technique to address such an issue? For example, rather than using the averaging approach<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext">Regards<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext">Rodney<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext"><o:p>&nbsp;</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 lang="EN-US" style="color:windowtext;mso-fareast-language:EN-MY">From:</span></b><span lang="EN-US" style="color:windowtext;mso-fareast-language:EN-MY"> Phillip Alday &lt;phillip.alday@mpi.nl&gt;
<br>
<b>Sent:</b> Thursday, 22 August, 2019 4:33 PM<br>
<b>To:</b> Discussion and support forum for the users of MNE Software &lt;mne_analysis@nmr.mgh.harvard.edu&gt;; RODNEY PETRUS BALANDONG &lt;rodney.petrus_g03291@utp.edu.my&gt;<br>
<b>Subject:</b> Re: [Mne_analysis] Badly resample signal<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p>This is expected behavior for resampling. With resampling, you lose temporal resolution, so fast, high amplitude deviations are lost.&nbsp; This is what happens at the beginning of your signal. Later in the signal you see that the slower change in the mean of
 the signal is preserved, but the bumps are list. <o:p></o:p></p>
<p>Intuitively: you have fewer samples, so you can't capture both the deviations up and the deviations down, so they average out and you get just the mean. So the big peak and big trough early in your example just cancel out when resampled.<o:p></o:p></p>
<p>Phillip<o:p></o:p></p>
<div>
<p class="MsoNormal">On 22/08/2019 07:01, RODNEY PETRUS BALANDONG wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p><b><span style="color:white;background:red">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;External Email - Use Caution&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></b><o:p></o:p></p>
<p class="MsoNormal">Dear All,<o:p></o:p></p>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
<p class="MsoNormal">The issue is about sample badly approximated<o:p></o:p></p>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
<p class="MsoNormal">Given an original signal sampled at 100Hz, the objective was to downsampled it into 50 Hz<o:p></o:p></p>
<p class="MsoNormal">The downsampling process was realised using the MNE resample.
<o:p></o:p></p>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
<p class="MsoNormal">However, as can be noticed from the image below, the sample is badly approximated. Instead of registering the original signal magnitude, the function RESAMPLE return an approximated signal magnitude.<o:p></o:p></p>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
<p class="MsoNormal">This rise two question<o:p></o:p></p>
<ol style="margin-top:0cm" start="1" type="1">
<li class="MsoListParagraph" style="margin-left:0cm;mso-list:l0 level1 lfo3">Is it common for such badly resample to occur?<o:p></o:p></li><li class="MsoListParagraph" style="margin-left:0cm;mso-list:l0 level1 lfo3">If yes, how to minimize this<o:p></o:p></li></ol>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
<p class="MsoNormal">The problem can be reproduced using the notebook which is accessible through this
<a href="https://github.com/balandongiv/EyeCloseOpen/blob/master/HelpImportDownsample_EDF.ipynb">
link</a>.<o:p></o:p></p>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
<p class="MsoNormal">Thanks in advance for entertaining this request<o:p></o:p></p>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
<p class="MsoNormal"><img border="0" width="405" height="269" style="width:4.2187in;height:2.802in" id="Picture_x0020_1" src="cid:image001.png@01D55908.0C8F3560" alt="A close up of
            a map
            Description automatically generated"><o:p></o:p></p>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
<p class="MsoNormal">Regards<o:p></o:p></p>
<p class="MsoNormal">Rodney<o:p></o:p></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-MY">DISCLAIMER : This e-mail and any files transmitted with it (&quot;Message&quot;) is intended only for the use of the recipient(s) named above and may contain confidential information. You are hereby notified
 that the taking of any action in reliance upon, or any review, retransmission, dissemination, distribution, printing or copying of this Message or any part thereof by anyone other than the intended recipient(s) is strictly prohibited. If you have received
 this Message in error, you should delete this Message immediately and advise the sender by return e-mail. Opinions, conclusions and other information in this Message that do not relate to the official business of Universiti Teknologi PETRONAS (UTP) shall be
 understood as neither given nor endorsed by Universiti Teknologi PETRONAS (UTP).
<br>
<br>
<o:p></o:p></span></p>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>Mne_analysis mailing list<o:p></o:p></pre>
<pre><a href="mailto:Mne_analysis@nmr.mgh.harvard.edu">Mne_analysis@nmr.mgh.harvard.edu</a><o:p></o:p></pre>
<pre><a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis">https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis</a><o:p></o:p></pre>
</blockquote>
</div>
DISCLAIMER : This e-mail and any files transmitted with it (&quot;Message&quot;) is intended only for the use of the recipient(s) named above and may contain confidential information. You are hereby notified that the taking of any action in reliance upon, or any review,
 retransmission, dissemination, distribution, printing or copying of this Message or any part thereof by anyone other than the intended recipient(s) is strictly prohibited. If you have received this Message in error, you should delete this Message immediately
 and advise the sender by return e-mail. Opinions, conclusions and other information in this Message that do not relate to the official business of Universiti Teknologi PETRONAS (UTP) shall be understood as neither given nor endorsed by Universiti Teknologi
 PETRONAS (UTP).
</body>
</html>