<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body bgcolor="#FFFFFF" text="#000000"><p><span style="padding: 3px 10px; border-radius: 5px; color: #ffffff; font-weight: bold; display: inline-block; background-color: #ff0000;"> External Email - Use Caution </span></p><p></p>
<p>But why do you need to resample? That's what I meant with an XY
problem. <br>
</p>
<p>Why do you care about brief high-frequency peaks? <br>
</p>
<p>Phillip<br>
</p>
<div class="moz-cite-prefix">On 22/08/2019 11:46, RODNEY PETRUS
BALANDONG wrote:<br>
</div>
<blockquote type="cite"
cite="mid:SG2PR01MB2919BF2D6E8D3740476218B9DAA50@SG2PR01MB2919.apcprd01.prod.exchangelabs.com">
<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.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;
        mso-fareast-language:EN-US;}
span.EmailStyle22
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle23
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle24
        {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:1717584108;
        mso-list-template-ids:-586666482;}
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]-->
<div class="WordSection1">
<p class="MsoNormal"><span style="color:windowtext">I need to
downsample an original signal that sampled at 1000Hz to
100Hz.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext"><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;mso-fareast-language:EN-MY"
lang="EN-US">From:</span></b><span
style="color:windowtext;mso-fareast-language:EN-MY"
lang="EN-US"> Phillip Alday <a class="moz-txt-link-rfc2396E" href="mailto:phillip.alday@mpi.nl"><phillip.alday@mpi.nl></a>
<br>
<b>Sent:</b> Thursday, 22 August, 2019 4:44 PM<br>
<b>To:</b> RODNEY PETRUS BALANDONG
<a class="moz-txt-link-rfc2396E" href="mailto:rodney.petrus_g03291@utp.edu.my"><rodney.petrus_g03291@utp.edu.my></a><br>
<b>Cc:</b> <a class="moz-txt-link-abbreviated" href="mailto:mne_analysis@nmr.mgh.harvard.edu">mne_analysis@nmr.mgh.harvard.edu</a><br>
<b>Subject:</b> Re: [Mne_analysis] Badly resample signal<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p>Appropriate filtering may help with some things, but .... I
think we're heading into XY question territory here (<a
href="http://xyproblem.info/" moz-do-not-send="true">http://xyproblem.info/</a>).<o:p></o:p></p>
<p>Why do you want to resample? What are you trying to
accomplish?<o:p></o:p></p>
<p>Phillip<o:p></o:p></p>
<div>
<p class="MsoNormal">On 22/08/2019 11:38, RODNEY PETRUS
BALANDONG wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span style="color:windowtext">Dear
Phillip,</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:windowtext"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:windowtext">Thanks for
the response,</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:windowtext"> </span><o:p></o:p></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</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:windowtext"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:windowtext">Regards</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:windowtext">Rodney</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:windowtext"> </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;mso-fareast-language:EN-MY"
lang="EN-US">From:</span></b><span
style="color:windowtext;mso-fareast-language:EN-MY"
lang="EN-US"> Phillip Alday
<a href="mailto:phillip.alday@mpi.nl"
moz-do-not-send="true"><phillip.alday@mpi.nl></a>
<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 <a
href="mailto:mne_analysis@nmr.mgh.harvard.edu"
moz-do-not-send="true">
<mne_analysis@nmr.mgh.harvard.edu></a>; RODNEY
PETRUS BALANDONG <a
href="mailto:rodney.petrus_g03291@utp.edu.my"
moz-do-not-send="true">
<rodney.petrus_g03291@utp.edu.my></a><br>
<b>Subject:</b> Re: [Mne_analysis] Badly resample
signal</span><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"> <o:p></o:p></p>
<p>This is expected behavior for resampling. With resampling,
you lose temporal resolution, so fast, high amplitude
deviations are lost. 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"> External
Email - Use Caution </span></b><o:p></o:p></p>
<p class="MsoNormal">Dear All,<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">The issue is about sample badly
approximated<o:p></o:p></p>
<p class="MsoNormal"> <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"> <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"> <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"> <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"
moz-do-not-send="true">
link</a>.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Thanks in advance for entertaining this
request<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"><img
style="width:4.2187in;height:2.802in"
id="Picture_x0020_1"
src="cid:part6.31592842.C31FC33E@mpi.nl" alt="A close up
of a map Description automatically generated" class=""
height="269" border="0" width="405"><o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> <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 ("Message") 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>
<br>
</span><o:p></o:p></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" moz-do-not-send="true">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" moz-do-not-send="true">https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis</a><o:p></o:p></pre>
</blockquote>
<p class="MsoNormal"><span style="mso-fareast-language:EN-MY">DISCLAIMER
: This e-mail and any files transmitted with it
("Message") 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).
<o:p></o:p></span></p>
</blockquote>
</div>
DISCLAIMER : This e-mail and any files transmitted with it
("Message") 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).
</blockquote>
</body>
</html>