.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/plot_3_4_1_distant_components_long_gaussian.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_3_4_1_distant_components_long_gaussian.py: =================================================== Distant Chirps with a Long Gaussian Analysis Window =================================================== This example visualizes a spectrogram of two chirp signals which are well separated in frequency ranges. A longer Gaussian analysis window suffices here to see the separation of frequencies, since the variation in frequencies is relatively slow. Figure 3.18 from the tutorial. .. GENERATED FROM PYTHON SOURCE LINES 21-32 .. image-sg:: /auto_examples/images/sphx_glr_plot_3_4_1_distant_components_long_gaussian_001.png :alt: SPECTROGRAM, Signal in time :srcset: /auto_examples/images/sphx_glr_plot_3_4_1_distant_components_long_gaussian_001.png :class: sphx-glr-single-img .. code-block:: default from tftb.generators import fmlin from tftb.processing.cohen import Spectrogram import numpy as np import matplotlib.pyplot as plt sig = fmlin(128, 0, 0.3)[0] + fmlin(128, 0.2, 0.5)[0] window = np.exp(np.log(0.005) * np.linspace(-1, 1, 63) ** 2) spec = Spectrogram(sig, fwindow=window, n_fbins=128) spec.run() spec.plot(show_tf=True, cmap=plt.cm.gray) .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 0.255 seconds) .. _sphx_glr_download_auto_examples_plot_3_4_1_distant_components_long_gaussian.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_3_4_1_distant_components_long_gaussian.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_3_4_1_distant_components_long_gaussian.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_