{
  "cells": [
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "%matplotlib inline"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "\n# Estimate the Instantaneous Freuqncy of a Chirp\n\nConstruct a chirp and estimate its [instantaneous\nfrequency](https://en.wikipedia.org/wiki/Instantaneous_phase#Instantaneous_frequency).\n\nFigure 2.3 from the tutorial.\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "from tftb.generators import fmlin\nfrom tftb.processing import plotifl, inst_freq\n# TODO: There doesn't have to be something called `plotifl`. Put this into a\n# separate visualization module.\nimport numpy as np\n\n\nsignal, _ = fmlin(256)\ntime_samples = np.arange(3, 257)\nifr = inst_freq(signal)[0]\nplotifl(time_samples, ifr)"
      ]
    }
  ],
  "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
}