.. note:: :class: sphx-glr-download-link-note Click :ref:`here ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_plot_3_1_4_frequency_resolution.py: ================================================ Time-frequency Resolution: Long Analysis Window ================================================ This example shows the effect of an analysis window which is long in time on the time-frequency resolution. Specifically, longer windows have good frequency resolutions but poor time resolutions. Figure 3.6 from the tutorial. .. image:: /auto_examples/images/sphx_glr_plot_3_1_4_frequency_resolution_001.png :class: sphx-glr-single-img .. code-block:: default import numpy as np from tftb.processing.linear import ShortTimeFourierTransform from tftb.generators import fmlin, amgauss import matplotlib.pyplot as plt x = np.real(amgauss(128) * fmlin(128)[0]) window = np.ones((128,)) stft = ShortTimeFourierTransform(x, n_fbins=128, fwindow=window) stft.run() stft.plot(show_tf=True, cmap=plt.cm.gray) .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 0.445 seconds) .. _sphx_glr_download_auto_examples_plot_3_1_4_frequency_resolution.py: .. only :: html .. container:: sphx-glr-footer :class: sphx-glr-footer-example .. container:: sphx-glr-download :download:`Download Python source code: plot_3_1_4_frequency_resolution.py ` .. container:: sphx-glr-download :download:`Download Jupyter notebook: plot_3_1_4_frequency_resolution.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_