semvec/pypi-packages huggingface dataset:
ewtpy 0.2
Empirical Wavelet Transofrm (EWT) algorithm
Keywords: EWT,empirical,wavelet

#  ewtpy - Empirical wavelet transform in Python

Adaptive decomposition of a signal with the EWT ([Gilles, 2013](https://doi.org/10.1109/TSP.2013.2265222)) method

Python translation from the [original Matlab toolbox](https://www.mathworks.com/matlabcentral/fileexchange/42141-empirical-wavelet-transforms).  

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

2) 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
```python
#%% 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)
```
vmdpy 0.2
Variational Mode Decomposition (VMD) algorithm
Keywords: VMD,variational,decomposition

# vmdpy: Variational mode decomposition in Python

Function for decomposing a signal according to the Variational Mode Decomposition ([Dragomiretskiy and Zosso, 2014](https://doi.org/10.1109/TSP.2013.2288675)) method.  

This package is a Python translation of the original [VMD MATLAB toolbox](https://www.mathworks.com/matlabcentral/fileexchange/44765-variational-mode-decomposition)  


## Installation 

1) pip install vmdpy 

OR

2) Dowload the project from https://github.com/vrcarva/vmdpy, then run "python setup.py install" from the project folder

## 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. 

For suggestions, questions, comments, etc: vrcarva@ufmg.br  
Vinicius Rezende Carvalho  
Programa de Pós-Graduação em Engenharia Elétrica – Universidade Federal de Minas Gerais, Belo Horizonte, Brasil  
Núcleo de Neurociências - Universidade Federal de Minas Gerais  


## Example script
```python
#%% Simple example  
import numpy as np  
import matplotlib.pyplot as plt  
from vmdpy import VMD  

#. Time Domain 0 to T  
T = 1000  
fs = 1/T  
t = np.arange(1,T+1)/T  
freqs = 2*np.pi*(t-0.5-fs)/(fs)  

#. center frequencies of components  
f_1 = 2  
f_2 = 24  
f_3 = 288  

#. modes  
v_1 = (np.cos(2*np.pi*f_1*t))  
v_2 = 1/4*(np.cos(2*np.pi*f_2*t))  
v_3 = 1/16*(np.cos(2*np.pi*f_3*t))  

f = v_1 + v_2 + v_3 + 0.1*np.random.randn(v_1.size)  

#. some sample parameters for VMD  
alpha = 2000       # moderate bandwidth constraint  
tau = 0.            # noise-tolerance (no strict fidelity enforcement)  
K = 3              # 3 modes  
DC = 0             # no DC part imposed  
init = 1           # initialize omegas uniformly  
tol = 1e-7  


#. Run actual VMD code  
u, u_hat, omega = VMD(f, alpha, tau, K, DC, init, tol)  
```