.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/plot_4_1_1_pwv_atoms.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. 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. .. GENERATED FROM PYTHON SOURCE LINES 21-35 .. image-sg:: /auto_examples/images/sphx_glr_plot_4_1_1_pwv_atoms_001.png :alt: PSEUDO WINGER-VILLE, Signal in time :srcset: /auto_examples/images/sphx_glr_plot_4_1_1_pwv_atoms_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none /home/docs/checkouts/readthedocs.org/user_builds/tftb/envs/stable/lib/python3.7/site-packages/matplotlib/contour.py:1180: 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.338 seconds) .. _sphx_glr_download_auto_examples_plot_4_1_1_pwv_atoms.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_4_1_1_pwv_atoms.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_4_1_1_pwv_atoms.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_