Ideal time resolutionΒΆ

This example demonstrates that only the shortest possible window can provide ideal resolution in time.

Figure 3.5 from the tutorial.

../_images/sphx_glr_plot_3_1_4_time_resolution_001.png
import numpy as np
from tftb.processing.linear import ShortTimeFourierTransform
from tftb.generators import fmlin, amgauss
from matplotlib.pyplot import cm

x = np.real(amgauss(128) * fmlin(128)[0])
window = np.array([1])
stft = ShortTimeFourierTransform(x, n_fbins=128, fwindow=window)
tfr, _, _ = stft.run()

stft.plot(show_tf=True, cmap=cm.gray)

Total running time of the script: ( 0 minutes 0.466 seconds)

Gallery generated by Sphinx-Gallery