Open-source project
vrcarva/ewtpy avatar
vrcarva/ewtpy

ewtpy is a 1D EWT port with unpinned numpy, last touched in 2020

Empirical wavelet transform (EWT) in Python

100 stars20 forksPythonMIT

At a glance

What is it?
A Python translation of Gilles' Matlab empirical wavelet transform, wrapping boundary detection, completion, the Meyer filter bank and the Meyer wavelet into one call. The page names what was left out, and the setup file pins nothing.
Who is it for?
ewtpy fits someone reproducing a 1D adaptive decomposition in Python, in particular the EEG seizure-detection comparison its authors published, and who is content to work against a fixed set of default boundary options. It does not fit 2D data, anyone needing the adaptive or ScaleSpace boundary detection methods, or anyone who wants a maintained dependency.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Probably not. The repository last received commits 73 months ago, on October 15, 2020.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 23, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • vrcarva/ewtpy100 ★ · +0
Star history
Repository2026-08-182026-10-23
vrcarva/ewtpy100100

0 Stars in the last 66 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

The last push was 2020-10-15 and setup.py pins nothing

The maintenance picture is the first thing to establish, and for numerical code it decides the risk.

The last push to the `master` branch was on 2020-10-15. The repository publishes no releases, is not archived, and carries its licence in `LICENSE.txt`. `setup.py` declares version `0.1` and a classifier reading `Development Status :: 3 - Alpha`.

The consequential line is not the date but the dependency list: `install_requires` names numpy and scipy and nothing else. No floors, no ceilings, no extras. So a fresh install resolves to whatever numpy and scipy are current, and a 2020 implementation of a transform with filters, boundary completion and a Meyer filter bank is being handed an environment six years newer than the one it was written against.

That is not a reason not to use it. EWT1D is a decomposition of a 1D array and the arithmetic is not exotic. It is a reason to run it once on your own signal and compare against a reference decomposition before you trust it, and a reason to expect a dependency conflict in an environment that has already resolved numpy for something else.

Two install routes, and one of them is the legacy invocation

The installation section offers two choices.

The first is to download the project from the GitHub URL and then run `python setup.py install` from the project folder. The second is:

bash
pip install ewtpy

Use the second. The repository contains `setup.py` and no `pyproject.toml`, so the direct-invocation route is the old path that current packaging tooling discourages, and `pip install` is the one the page's own ordering suggests you prefer.

Two small details in the packaging file are worth noting if you are reading rather than installing. The `url` field is `http://github.com/vrcarva/ewtpy` rather than https, and the description string carries a typo, reading `Empirical Wavelet Transofrm (EWT) algorithm`. Both are cosmetic and neither affects an install.

The file also reads `long_description` straight out of `README.md` and declares `long_description_content_type="text/markdown"`, so whatever the page says about limitations is what an index shows. That is a nice property here, since the limitations it describes are the reason to check the scope before importing it.

EWT1D returns a transform, a filter bank and the boundaries it chose

The whole interface is one call, and its signature is written out in full on the page:

code
ewt,  mfb ,boundaries = EWT1D(f, N = 5, log = 0,detect = "locmax", completion = 0, reg = 'average', lengthFilter = 10,sigmaFilter = 5)

Three return values, and they tell you what the function did. The first is the transform itself. The second, `mfb`, is the filter bank. The third is the boundaries, which are the scale divisions the function detected in the signal rather than boundaries you supplied.

Every parameter has a default in that line, and the two that matter most are the ones that decide how those boundaries are found. `detect` defaults to `"locmax"`, and the module exposes `LocalMax` and `LocalMaxMin` alongside it. `completion` defaults to `0`, so boundary completion is off unless you turn it on, and `reg` defaults to `'average'`, the rule that would be used if it were on. `N` is the number of scales, five by default. `lengthFilter` and `sigmaFilter` size the smoothing applied before detection.

The rest of the module is the pieces as separate functions, which is what makes it usable if you want to override one stage: `EWT_Boundaries_Detect`, `EWT_Boundaries_Completion`, `EWT_Meyer_FilterBank`, `EWT_beta`, `EWT_Meyer_Wavelet`, plus `LocalMax` and `LocalMaxMin`.

Three pieces of the original toolbox are missing, and the page says so

The most useful sentence on the page is the one that lists what was not ported. Some functionalities from Gilles' MATLAB toolbox have not been implemented, and three are named: the EWT of 2D inputs, preprocessing, and the adaptive and ScaleSpace boundary detection methods.

That list is worth taking literally rather than as a disclaimer. It means the package is a 1D transform only. If your signal is an image or a matrix, there is nothing here, and the repository will not do it for you in a later version either, since the last change was in 2020. It also means the boundary detection options are narrower than the method has available: you get the `locmax` family and not the adaptive or ScaleSpace variants.

This is also where the alternative is. The page names its own source, the original Matlab toolbox, with a link to the MathWorks file exchange entry. So the comparison is not abstract. The Matlab implementation is the reference, and it is the one that has the 2D transform, the preprocessing and the wider set of boundary detectors. ewtpy is the version you would reach for when you want the method in Python and can live with that narrower scope.

Preprocessing is the third omission and the easiest to supply yourself, since a 1D array arriving from your own acquisition path can be filtered before you call the function.

The example folder carries the EEG data from the authors' paper

The examples explain where this came from. The folder holds one test script and four data files: `EWTtests.py`, `eeg.csv`, `sig1.csv`, `sig2.csv` and `sig3.csv`.

The EEG file is the tell. The citation on the page is to a paper titled Evaluating five different adaptive decomposition methods for EEG signal seizure detection and classification, published in Biomedical Signal Processing and Control, volume 62, 2020, article 102073. So ewtpy was written to serve a comparison of five adaptive decomposition methods on seizure detection, and the data from that comparison is in the repository next to the code.

That makes it a good fit for reproducing that line of work and a poor fit for anything expecting a general-purpose signal library. There is no dataset loader, no preprocessing pipeline and no classifier here; there is a transform, a folder of CSV files, and a paper.

Two small irregularities in the folder. The README calls it the Example folder while the tree has `example/`, and a `__pycache__` directory sits inside it, which is a Python build artefact that should not be in version control and was, at some point, committed.

The example script is a sum of three cosines

The script on the page is short enough to read as the specification of what the function expects:

python
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)

A thousand samples on a normalised time axis, built from three cosine components at 0.8, 10 and 100 cycles with amplitudes 1, 2 and 0.8. Then one call with three scales, and two plots: the input and the transform.

Three things follow from that shape of input. The function takes a plain numpy array and returns a plain numpy array, so nothing about the interface is unusual. A multi-component synthetic signal like this one is a fair test case for a method that adapts its scale boundaries to the signal, because the expected structure is known. And comparing `f` against `ewt` in a single figure is how you check whether the decomposition preserved the three components rather than smoothing them into each other.

Contributions arrive as files by email, and the contributor names the credit

The way this project takes patches is stated in one sentence, and it is unusual enough to quote.

If you developed a new functionality or fixed anything in the code, you are asked to provide the corresponding files and which credit should be included in the readme file. So contributions are file attachments by email rather than a pull request, and the credit line is chosen by the contributor.

The rest of the repository is consistent with that. There is no `CONTRIBUTING.md`, no issue tracker guidance, no `tests/` directory, no continuous integration configuration and no `.github/` directory. The five top-level entries are `LICENSE.txt`, `README.md`, the `ewtpy/` package directory, `example/` and `setup.py`.

Contact is an address, `[email protected]`, and the author block gives the institutional context: Vinícius Rezende Carvalho, a postgraduate programme in electrical engineering at UFMG, the Federal University of Minas Gerais in Belo Horizonte, and the Neuroscience Nucleus there.

For anyone deciding whether to use this, that tells you the maintenance model. If you find a bug, the route is a person rather than a tracker, and the route to fixing it is a fork rather than an upstream merge.

Editorial conclusion

ewtpy fits someone reproducing a 1D adaptive decomposition in Python, in particular the EEG seizure-detection comparison its authors published, and who is content to work against a fixed set of default boundary options. It does not fit 2D data, anyone needing the adaptive or ScaleSpace boundary detection methods, or anyone who wants a maintained dependency. Verify three things before you build on it: that the numpy and scipy versions you already have still import it, since `install_requires` carries no floors and the code has not changed since 2020-10-15; which boundary method you need, because `detect` defaults to `locmax` and the adaptive and ScaleSpace options are the ones this port omits; and whether you should use the Matlab toolbox it was translated from, which carries those three missing pieces. Licence is MIT in `LICENSE.txt`, the setup version is 0.1, and there are no releases.

Frequently asked questions

How do I install ewtpy?

The page offers two routes: download the project and run python setup.py install from the project folder, or pip install ewtpy. The repository contains setup.py and no pyproject.toml, and install_requires lists numpy and scipy with no version floors.

What does ewtpy's EWT1D function return?

Three values: the transform, the Meyer filter bank, and the detected boundaries. The default call is EWT1D(f, N = 5, log = 0, detect = "locmax", completion = 0, reg = 'average', lengthFilter = 10, sigmaFilter = 5).

Does ewtpy support 2D inputs?

No. The README states that the EWT of 2D inputs is one of the functionalities from Gilles' MATLAB toolbox that has not been implemented, alongside preprocessing and the adaptive and ScaleSpace boundary detection methods.

Which functions does ewtpy expose besides EWT1D?

EWT_Boundaries_Detect, EWT_Boundaries_Completion, EWT_Meyer_FilterBank, EWT_beta, EWT_Meyer_Wavelet, LocalMax and LocalMaxMin. The package is a Python translation from the original Matlab toolbox, which is linked on the page.

Is ewtpy still being maintained?

The last push to the master branch was on 2020-10-15 and the repository publishes no releases. setup.py declares version 0.1 with a Development Status :: 3 - Alpha classifier, and the licence is MIT in LICENSE.txt.

Official sources

  1. Official README
  2. Project repository
  3. README
  4. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/vrcarva-ewtpy.svg)](https://hysenlabs.com/projects/vrcarva-ewtpy)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/vrcarva-ewtpy.svg)](https://hysenlabs.com/projects/vrcarva-ewtpy)

Was this useful?