{
  "cells": [
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "%matplotlib inline"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "\n# Wigner-Ville Distribution of Gaussian Atoms\n\nThis example shows the WV distribution of four Gaussian atoms, each localized\nat the corner of a rectangle in the time-frequency plane. The distribution does\nshow the four signal terms, as well as six interference terms.\n\nFigure 4.4 from the tutorial.\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "import numpy as np\nfrom tftb.generators import atoms\nfrom tftb.processing import WignerVilleDistribution\n\nx = np.array([[32, .15, 20, 1],\n             [96, .15, 20, 1],\n             [32, .35, 20, 1],\n             [96, .35, 20, 1]])\ng = atoms(128, x)\nspec = WignerVilleDistribution(g)\nspec.run()\nspec.plot(kind=\"contour\", show_tf=True, scale=\"log\")"
      ]
    }
  ],
  "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
}