twistpy.utils.istransform#

istransform(st: ndarray, f: ndarray, k: float = 1.0, use_filter: bool = False) ndarray[source]#

Compute the inverse S-transform.

This function computes the approximate inverse S-transform after Schimmel et al. (2005) [1]. This inverse has some advantageous properties over the conventional inverse S-transform as it reduces filter artifacts if the time-frequency spectrum is modified before the back-transform. Note that this inverse is only an approximation of the true inverse transform (even though a very good one), as described in [2]. The inverse transform that is implemented here is defined as:

\[\ u(t)=\ k\sqrt{2\pi}\int_{-\infty}^{\infty}\frac{S(\tau,\ f)}{\left|f\right|}e^{+i2\pi ft}df,\]

where \(S(\tau, \ f)\) is the time-frequency spectrum obtained using the forward S-transform, \(\tau\) is the translation of the Gaussian window, \(f\) is frequency, and \(k\) is the user-set constant specifying the scaling factor controlling the number of oscillations in the window specified in the forward transform (see twistpy.utils.stransform and the example below).

The conventional inverse S-transform can simply be obtained as:

\[\ u(t)=\ \int_{-\infty}^{\infty}\int_{-\infty}^{\infty}{S(\tau,\ f)}e^{+i2\pi ft}d\tau df\]

Or in Python code:

u = scipy.fft.irfft(numpy.sum(st, axis=-1))

Hint

[1] Schimmel, M., & Gallart, J. (2005). The inverse S-transform in filters with time-frequency localization. IEEE Transactions on Signal Processing, 53(11), 4417–4422. https://doi.org/10.1109/TSP.2005.857065

[2] Simon, C., Ventosa, S., Schimmel, M., Heldring, A., Dañobeitia, J. J., Gallart, J., & Mànuel, A. (2007). The S-transform and its inverses: Side effects of discretizing and filtering.IEEE Transactions on Signal Processing, 55(10), 4928–4937. https://doi.org/10.1109/TSP.2007.897893

Parameters
stnumpy.ndarray of numpy.complex128

S-transformed signal.

fnumpy.ndarray of float

Normalized frequency vector.

kfloat, default = 1.0

Scaling factor that controls the number of oscillations in the window.

use_filterbool, default = False

Deconvolve the filter that describes the approximation

Returns
signalnumpy.ndarray of float

Real-valued signal.

Examples using twistpy.utils.istransform#

S-transform

S-transform