{
  "cells": [
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "%matplotlib inline"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "\n# Sampling Effects on the Wigner-Ville Distribution of a Real Valued Gaussian Atom\n\nThis example shows the Wigner-Ville distribution of a real valued Gaussian\natom. If a signal is sampled at the Nyquist rate, the WVD is affected by\nspectral aliasing and many additional interferences. To fix this, either the\nsignal may be oversampled, or an analytical signal may be used.\n\nFigure 4.6 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, .32, 20, 1]])\ng = atoms(128, x)\nspec = WignerVilleDistribution(np.real(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
}