Empirical wavelet transform (EWT) in Python
Last updated Apr 2, 2026
100
Stars
20
Forks
0
Issues
0
Stars/day
Attention Score
12
Topics
Language breakdown
Python 100.0%
▸ Files
click to expand
README
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: EWTBoundariesDetect EWTBoundariesCompletion EWTMeyerFilterBank EWT_beta EWTMeyerWavelet 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 scriptsInstallation
1) Dowload the project from https://github.com/vrcarva/ewtpy, then run "python setup.py install" from the project folder OR 2) pip install ewtpyCitation 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 - NNCExample 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(2np.pi0.8t) + 2np.cos(2np.pi10t)+0.8np.cos(2np.pi100*t)
ewt, mfb ,boundaries = ewtpy.EWT1D(f, N = 3)
plt.plot(f)
plt.plot(ewt)🔗 More in this category