jkh920184196 / superlets

Superlets algorithm for time-frequency analysis implemented in JAX/Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Superlets

This repository provides an unofficial JAX/Python implementation of the Superlets algorithm introduced in Time-frequency super-resolution with superlets (Moca et. al., 2021), originally in the context of neuroscience/optogenetics data. The original MATLAB implementation can be found here.

Demo

In time-frequency analysis, we convert a signal into a time-frequency representation, where we want to identify how "strongly" each frequency component is activated at each timestep. Due to the Gabor limit, there are fundamental limitations to how precise our estimates can be: higher frequency precision requires trading off precision in time, and vice versa. In wavelet analysis, this is typically controlled by the number of cycles used in each wavelet.

For instance, suppose we have the following test signal (similar to that of Fig. 3 in the paper):

Signal

We can obtain three different scalograms by varying the number of cycles used per wavelet. More cycles result in a more precise estimate of frequency, at the expense of precision in time:

Wavelet

However, the proposed solution in the superlets paper is that Wavelet transforms aren't Pareto optimal (that is, you can improve on both time and frequency without having to make trade-offs), and can be improved by taking the geometric mean of wavelets of different cycles, resulting in the following:

Superlet

Note

This algorithm uses a non-standard normalization for the wavelets used; typically, the square of the wavelets are normalized to a value of 1, here the absolute value is. The authors provide a justification for this in the supplementary information on page 7. Both figures above here use absolute value normalization.

References

Moca, V. V., Bârzan, H., Nagy-Dăbâcan, A., & Mureșan, R. C. (2021). Time-frequency super-resolution with superlets. Nature Communications, 12(1), 337. https://doi.org/10.1038/s41467-020-20539-9

About

Superlets algorithm for time-frequency analysis implemented in JAX/Python

License:MIT License


Languages

Language:Python 100.0%