.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/plot_5_4_2_hough_noisy_chirp.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_5_4_2_hough_noisy_chirp.py: ================================= Wigner-Hough Transform of a Chirp ================================= This example demonstrates the use of the Hough transform to extract the estimates of a chirp signal from its Wigner Ville distribution. Figure 5.4 from the tutorial. .. GENERATED FROM PYTHON SOURCE LINES 19-39 .. image-sg:: /auto_examples/images/sphx_glr_plot_5_4_2_hough_noisy_chirp_001.png :alt: plot 5 4 2 hough noisy chirp :srcset: /auto_examples/images/sphx_glr_plot_5_4_2_hough_noisy_chirp_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none /home/docs/checkouts/readthedocs.org/user_builds/tftb/checkouts/stable/doc/_gallery/plot_5_4_2_hough_noisy_chirp.py:34: MatplotlibDeprecationWarning: Calling gca() with keyword arguments was deprecated in Matplotlib 3.4. Starting two minor releases later, gca() will take no keyword arguments. The gca() function should only be used to get the current axes, or if no axes exist, create new axes with default keyword arguments. To create a new axes with non-default arguments, use plt.axes() or plt.subplot(). ax = fig.gca(projection='3d') | .. code-block:: default import numpy as np from tftb.generators import noisecg, sigmerge, fmlin from tftb.processing.cohen import WignerVilleDistribution from tftb.processing.postprocessing import hough_transform import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D N = 64 sig = sigmerge(fmlin(N, 0, 0.3)[0], noisecg(N), 1) tfr, _, _ = WignerVilleDistribution(sig).run() ht, rho, theta = hough_transform(tfr, N, N) theta, rho = np.meshgrid(theta, rho) fig = plt.figure() ax = fig.gca(projection='3d') ax.plot_wireframe(theta, rho, ht) ax.set_xlabel('Theta') ax.set_ylabel('Rho') plt.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 1.980 seconds) .. _sphx_glr_download_auto_examples_plot_5_4_2_hough_noisy_chirp.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_5_4_2_hough_noisy_chirp.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_5_4_2_hough_noisy_chirp.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_