{
  "cells": [
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "%matplotlib inline"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "\n# Wigner-Ville Distribution of a Noisy Chirp\n\nThis example shows the Wigner-Ville distribution of a noisy chirp signal. The\nlinear frequency increase is undetectable in the time domain, but a straight\nline can be seen in the distribution.\n\nFigure 5.3 from the tutorial.\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "from tftb.generators import noisecg, sigmerge, fmlin\nfrom tftb.processing.cohen import WignerVilleDistribution\n\nN = 64\nsig = sigmerge(fmlin(N, 0, 0.3)[0], noisecg(N), 1)\nwvd = WignerVilleDistribution(sig)\nwvd.run()\nwvd.plot(kind='contour', show_tf=True, sqmod=True)"
      ]
    }
  ],
  "metadata": {
    "kernelspec": {
      "display_name": "Python 3",
      "language": "python",
      "name": "python3"
    },
    "language_info": {
      "codemirror_mode": {
        "name": "ipython",
        "version": 3
      },
      "file_extension": ".py",
      "mimetype": "text/x-python",
      "name": "python",
      "nbconvert_exporter": "python",
      "pygments_lexer": "ipython3",
      "version": "3.7.9"
    }
  },
  "nbformat": 4,
  "nbformat_minor": 0
}