[Mne_analysis] Badly resample signal

Phillip Alday phillip.alday at mpi.nl
Thu Aug 22 04:52:43 EDT 2019
Search archives:

        External Email - Use Caution        

But why do you need to resample? That's what I meant with an XY problem.

Why do you care about brief high-frequency peaks?

Phillip

On 22/08/2019 11:46, RODNEY PETRUS BALANDONG wrote:
>
> I need to downsample an original signal that sampled at 1000Hz to 100Hz.
>
>  
>
> *From:*Phillip Alday <phillip.alday at mpi.nl>
> *Sent:* Thursday, 22 August, 2019 4:44 PM
> *To:* RODNEY PETRUS BALANDONG <rodney.petrus_g03291 at utp.edu.my>
> *Cc:* mne_analysis at nmr.mgh.harvard.edu
> *Subject:* Re: [Mne_analysis] Badly resample signal
>
>  
>
> Appropriate filtering may help with some things, but .... I think
> we're heading into XY question territory here (http://xyproblem.info/).
>
> Why do you want to resample? What are you trying to accomplish?
>
> Phillip
>
> On 22/08/2019 11:38, RODNEY PETRUS BALANDONG wrote:
>
>     Dear Phillip,
>
>      
>
>     Thanks for the response,
>
>      
>
>     Just wonder whether there exist different technique to address
>     such an issue? For example, rather than using the averaging approach
>
>      
>
>     Regards
>
>     Rodney
>
>      
>
>     *From:*Phillip Alday <phillip.alday at mpi.nl>
>     <mailto:phillip.alday at mpi.nl>
>     *Sent:* Thursday, 22 August, 2019 4:33 PM
>     *To:* Discussion and support forum for the users of MNE Software
>     <mne_analysis at nmr.mgh.harvard.edu>
>     <mailto:mne_analysis at nmr.mgh.harvard.edu>; RODNEY PETRUS BALANDONG
>     <rodney.petrus_g03291 at utp.edu.my>
>     <mailto:rodney.petrus_g03291 at utp.edu.my>
>     *Subject:* Re: [Mne_analysis] Badly resample signal
>
>      
>
>     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.
>
>     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.
>
>     Phillip
>
>     On 22/08/2019 07:01, RODNEY PETRUS BALANDONG wrote:
>
>         *        External Email - Use Caution        *
>
>         Dear All,
>
>          
>
>         The issue is about sample badly approximated
>
>          
>
>         Given an original signal sampled at 100Hz, the objective was
>         to downsampled it into 50 Hz
>
>         The downsampling process was realised using the MNE resample.
>
>          
>
>         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.
>
>          
>
>         This rise two question
>
>          1. Is it common for such badly resample to occur?
>          2. If yes, how to minimize this
>
>          
>
>         The problem can be reproduced using the notebook which is
>         accessible through this link
>         <https://github.com/balandongiv/EyeCloseOpen/blob/master/HelpImportDownsample_EDF.ipynb>.
>
>          
>
>         Thanks in advance for entertaining this request
>
>          
>
>          
>
>         A close up of a map Description automatically generated
>
>          
>
>          
>
>         Regards
>
>         Rodney
>
>         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).
>
>
>         _______________________________________________
>
>         Mne_analysis mailing list
>
>         Mne_analysis at nmr.mgh.harvard.edu <mailto:Mne_analysis at nmr.mgh.harvard.edu>
>
>         https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>
>     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).
>
> 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). 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20190822/974adb8f/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 23070 bytes
Desc: not available
Url : http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20190822/974adb8f/attachment-0001.png 


More information about the Mne_analysis mailing list