Skip to main content

ewtpy - Empirical wavelet transform in Python

Adaptive decomposition of a signal with the EWT (Gilles, 2013) method

Python translation from the original Matlab toolbox.

ewtpy performs the Empirical Wavelet Transform of a 1D signal over N scales. Main function is EWT1D:

ewt, mfb ,boundaries = EWT1D(f, N = 5, log = 0,detect = "locmax", completion = 0, reg = 'average', lengthFilter = 10,sigmaFilter = 5)
Other functions include:
EWT_Boundaries_Detect
EWT_Boundaries_Completion
EWT_Meyer_FilterBank
EWT_beta
EWT_Meyer_Wavelet
LocalMax
LocalMaxMin

Some functionalities from J.Gilles' MATLAB toolbox have not been implemented, such as EWT of 2D inputs, preprocessing, adaptive/ScaleSpace boundaries_detect.

The Example folder contains test signals and scripts

Installation

  1. Dowload the project from https://github.com/vrcarva/vmdpy, then run "python setup.py install" from the project folder

OR

  1. pip install ewtpy

Citation and Contact

Paper available at https://doi.org/10.1016/j.bspc.2020.102073.

If you find this package useful, we kindly ask you to cite it in your work.
Vinícius R. Carvalho, Márcio F.D. Moraes, Antônio P. Braga, Eduardo M.A.M. Mendes, Evaluating five different adaptive decomposition methods for EEG signal seizure detection and classification, Biomedical Signal Processing and Control, Volume 62, 2020, 102073, ISSN 1746-8094, https://doi.org/10.1016/j.bspc.2020.102073.

If you developed a new funcionality or fixed anything in the code, just provide me the corresponding files and which credit should I include in this readme file.

Any questions, comments, suggestions and/or corrections, please get in contact with vrcarva@ufmg.br

@author: Vinícius Rezende Carvalho Programa de pós graduação em engenharia elétrica - PPGEE UFMG Universidade Federal de Minas Gerais - Belo Horizonte, Brazil Núcleo de Neurociências - NNC

Example script

#%% Example script
import numpy as np
import matplotlib.pyplot as plt
import ewtpy

T = 1000
t = np.arange(1,T+1)/T
f = np.cos(2*np.pi*0.8*t) + 2*np.cos(2*np.pi*10*t)+0.8*np.cos(2*np.pi*100*t)
ewt,  mfb ,boundaries = ewtpy.EWT1D(f, N = 3)
plt.plot(f)
plt.plot(ewt)

Release files for ewtpy 0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for ewtpy 0.2
File Interpreter ABI Platform
ewtpy-0.2-py2.py3-none-any.whl Python 3, Python 2 none any Details

Release files / ewtpy-0.2-py2.py3-none-any.whl

Download URL ewtpy-0.2-py2.py3-none-any.whl
Size 8.9 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
378c3cc4d4cde7dab47480d4501f30088fc98f43836e3d59ccd413b4765ad6fd
BLAKE2b-256 checksum
How to use checksums
8bbb80f5725476143a25b1eb231055f52963917df2a94ccd12f51e5f4dade83c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.26.0 CPython/2.7.15

Release history Release notifications | RSS feed

This release

0.2 This release

1 release file

0.1

3 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page