.. 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_4_1_1_pwv_atoms.py: ================================================== Pseudo Wigner-Ville Distribution of Gaussian Atoms ================================================== This example shows the Pseudo Wigner-Ville distribution of four Gaussian atoms located at the corners of a rectangle in the time-frequency plane. The `PseudoWignerVilleDistribution` class uses frequency smoothing, which attenuates the interferences oscillating along the time axis. Figure 4.5 from the tutorial. .. image:: /auto_examples/images/sphx_glr_plot_4_1_1_pwv_atoms_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out Out: .. code-block:: none /home/docs/checkouts/readthedocs.org/user_builds/tftb/envs/latest/lib/python3.7/site-packages/matplotlib/contour.py:1197: ComplexWarning: Casting complex values to real discards the imaginary part self.levels = np.asarray(levels_arg).astype(np.float64) | .. code-block:: default import numpy as np from tftb.generators import atoms from tftb.processing import PseudoWignerVilleDistribution x = np.array([[32, .15, 20, 1], [96, .15, 20, 1], [32, .35, 20, 1], [96, .35, 20, 1]]) g = atoms(128, x) t = np.linspace(0, 1, 128) spec = PseudoWignerVilleDistribution(g, timestamps=t) spec.run() spec.plot(kind="contour", scale="log", show_tf=True) .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 0.655 seconds) .. _sphx_glr_download_auto_examples_plot_4_1_1_pwv_atoms.py: .. only :: html .. container:: sphx-glr-footer :class: sphx-glr-footer-example .. container:: sphx-glr-download :download:`Download Python source code: plot_4_1_1_pwv_atoms.py ` .. container:: sphx-glr-download :download:`Download Jupyter notebook: plot_4_1_1_pwv_atoms.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_