{
  "cells": [
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "%matplotlib inline"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "\n# Pseudo Wigner-Ville Distribution of Gaussian Atoms\n\nThis example shows the Pseudo Wigner-Ville distribution of four Gaussian atoms\nlocated at the corners of a rectangle in the time-frequency plane. The\n`PseudoWignerVilleDistribution` class uses frequency smoothing, which\nattenuates the interferences oscillating along the time axis.\n\nFigure 4.5 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 PseudoWignerVilleDistribution\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)\nt = np.linspace(0, 1, 128)\nspec = PseudoWignerVilleDistribution(g, timestamps=t)\nspec.run()\nspec.plot(kind=\"contour\", scale=\"log\", show_tf=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
}