diff --git a/notebooks/Interference.ipynb b/notebooks/Interference.ipynb
index 6b7651b..724b19a 100644
--- a/notebooks/Interference.ipynb
+++ b/notebooks/Interference.ipynb
@@ -1,1032 +1,1031 @@
 {
  "cells": [
   {
-   "cell_type": "code",
-   "execution_count": null,
+   "cell_type": "markdown",
    "metadata": {},
-   "outputs": [],
    "source": [
     "Resources / references\n",
     "\n",
     "Interferance pattern from point sources : \n",
     "    https://www.physicsclassroom.com/class/light/Lesson-1/Two-Point-Source-Interference\n",
     "    https://commons.wikimedia.org/wiki/File:Two_sources_interference.gif\n",
     "    https://www.cpp.edu/~ajm/materials/animations/interference.html\n",
     "    http://www.phy.ntnu.edu.tw/ntnujava/index.php?PHPSESSID=ace0q88shiav3pup2k2mrcs7f1&topic=15.msg91#msg91\n",
     "\n",
     "Library of many interesting JAVA applets :\n",
     "    https://www.cabrillo.edu/~jmccullough/Applets/Applets_by_Topic/Interference_Wave_Nature.html\n",
     "    \n",
     "    \n",
     "    \n",
     "    \n",
     "    (In Python simulations, we could use meep or lightpipes but would have to think if there is an easier / more transparent way of analytical calculation ) \n",
     "    \n",
     "    "
    ]
   },
   {
    "cell_type": "code",
    "execution_count": null,
    "metadata": {
     "ExecuteTime": {
      "end_time": "2019-12-03T19:22:46.529304Z",
      "start_time": "2019-12-03T19:22:46.523992Z"
     }
    },
    "outputs": [],
    "source": [
     "from __future__ import print_function\n",
     "import matplotlib.pyplot as plt\n",
     "import numpy as np\n",
     "from matplotlib.widgets import Slider\n",
     "from scipy.integrate import quad\n",
     "import math\n",
     "from scipy.integrate import simps\n",
     "\n",
     "\n",
     "from ipywidgets import interact, interactive, fixed, interact_manual\n",
     "import ipywidgets as widgets"
    ]
   },
   {
    "cell_type": "code",
    "execution_count": null,
    "metadata": {
     "ExecuteTime": {
      "end_time": "2019-12-03T19:22:46.678820Z",
      "start_time": "2019-12-03T19:22:46.670736Z"
     }
    },
    "outputs": [],
    "source": [
     "import numpy as np\n",
     "import matplotlib.pyplot as plt\n",
     "def get_r(x, y, x0=0, y0=0):\n",
     "    return np.sqrt((x-x0)**2 + (y-y0)**2)\n",
     "def point_source(x, y, x0=0, y0=0,lambda_=1.):\n",
     "    k = 2*np.pi / (lambda_)\n",
     "    return np.cos(k * get_r(x,y, x0, y0))"
    ]
   },
   {
    "cell_type": "code",
    "execution_count": null,
    "metadata": {
     "ExecuteTime": {
      "end_time": "2019-12-03T19:22:46.848825Z",
      "start_time": "2019-12-03T19:22:46.842182Z"
     }
    },
    "outputs": [],
    "source": [
     "%%javascript\n",
     "MathJax.Hub.Config({\n",
     "    TeX: { equationNumbers: { autoNumber: \"AMS\" } }\n",
     "});"
    ]
   },
   {
    "cell_type": "markdown",
    "metadata": {},
    "source": [
     "# Interference between spherical (or in 2D) waves from point sources "
    ]
   },
   {
    "cell_type": "markdown",
    "metadata": {},
    "source": [
     "# Generalisation to N equidistant sources\n",
     "\n",
     "( could use code for grating )"
    ]
   },
   {
    "cell_type": "markdown",
    "metadata": {},
    "source": [
     "# General form of a spherical wave\n",
     "\n",
     "We start by assuming the scalar wave equation:\n",
     "\n",
     "$ \\begin{equation} \\nabla^2 U = \\frac{1}{c^2} \\frac{\\partial^2 U}{\\partial t^2} \\end{equation} $\n",
     "\n",
     "Now if we consider a monochromatic wave, i.e., assume time dependance of the form : \n",
     "\n",
     "$ \\begin{equation} U (\\textbf{r},t) = u(\\textbf{r}) exp ( i \\omega t) \\end{equation} $\n",
     "\n",
     "and subsitute it into the scalar wave equation, we get :\n",
     "\n",
     "$ \\begin{equation} \\nabla ^2 u + k^2 u = 0 \\end{equation} $\n",
     "\n",
     "where $k$ $(= \\frac{\\omega}{c})$ represents the wave vector. For a spherical wave, $u(\\textbf{r})$ is a function of only the radial coordinate $r$. Thus, the equation reduces to:\n",
     "\n",
     "$ \\begin{equation} \\frac{1}{r^2} \\frac{d}{dr}(r^2 \\frac{du}{dr})  + k^2 u = 0 \\end{equation} $\n",
     "\n",
     "The function $\\chi (r) = r u(r) $ satisfies : \n",
     "\n",
     "$ \\begin{equation} \\frac{d^2 \\chi}{dr^2} + k^2 \\chi(r) = 0  \\end{equation} $\n",
     "Hence,\n",
     "\n",
     "$ \\begin{equation} \\chi (r) = e^{\\pm ikr}\\end{equation} $\n",
     "\n",
     "Thus, for monochromatic spherical waves :\n",
     "\n",
     "$ \\begin{equation} U(\\textbf{r}, t) = \\frac{A}{r} e^{i (\\omega t \\pm k r)} \\end{equation} $\n",
     "\n",
     "Here, $ A $ represents the amplitude of the wave; the $\\pm$ signs correspond to outgoing and incoming waves. The factor $ 1/r $ in front of the exponential implies the intensity of spherical waves emenating from a point source decays as $ 1/ r^2$, which is the inverse square law.\n",
     "\n",
     "\n",
     "$ \\begin{equation} \\end{equation} $\n",
     "$ \\begin{equation} \\end{equation} $\n",
     "$ \\begin{equation} \\end{equation} $\n"
    ]
   },
   {
    "cell_type": "markdown",
    "metadata": {},
    "source": []
   },
   {
    "cell_type": "markdown",
    "metadata": {},
    "source": [
     "# General derivation of the Fresnel-Kirchoff diffraction formula\n",
     "\n",
     "Let us consider an apperture $A$ in an opaque screen $SS'$ illuminated by spherical waves emanating from a point source $P_0$. We will now try to calculate the field at the point P on the other side of the aperture; the aperture is assumed to be on the $x-y$ plane.\n",
     "\n",
     "With the point P as the center, draw a sphere of radius $R$, which intersects the screen in a circular area; the circular area comprises of two parts: (a) the aperture $A$ and (b) a portion of the opaque screen denoted by $B$.\n",
     "\n",
     "![](fk1.png)\n",
     "\n",
     "![](fk2.png)\n",
     "\n",
     "In order to calculate the field at the point $P$, we use the integral theorem of Helmholtz and Kirchoff. \n",
     "--- \n",
     "\n",
     "## Integral Theorem of Helmholtz and Kirchoff \n",
     "\n",
     "Consider a volume $V$ and the closed surface $S$ surrounding it. Consider a function $u$ which along with it's first and second derivatives is defined and continuous on and inside the surface $S$. Consider a point $P$ within the volume $V$. Then, the Helmholtz-Kirchoff theorem states that: \n",
     "\n",
     "$$ u(P)=\\frac{1}{4 \\pi} \\iint_{S_{1}}\\left[u \\nabla\\left(\\frac{e^{-i k r}}{r}\\right)-\\frac{e^{-i k r}}{r} \\nabla u\\right] \\cdot \\hat{\\mathbf{n}} d S $$  \n",
     "or\n",
     "$$ u(P)=\\frac{1}{4 \\pi} \\iint_{S_{1}}\\left[u \\frac{\\partial}{\\partial r}\\left(\\frac{e^{-i k r}}{r}\\right) \\hat{\\mathbf{r}} \\cdot \\hat{\\mathbf{n}}-\\frac{e^{-i k r}}{r} \\nabla u \\cdot \\hat{\\mathbf{n}}\\right] d S $$\n",
     "\n",
     "This gives us the remarkable result that if a function $u$ along with it's first and second derivatives is known on a closed surface, then the value of the function at any point inside the surface can also be determined.\n",
     "\n",
     "---\n",
     "\n",
     "Coming back to our Physics problem, let us choose $S$ to comprise of the following parts: (1) the spherical surface $C$, (2) the illuminated aperture $A$, and (3) the nonilluminated portion of the screen $B$. Thus, the equation takes the form : \n",
     "\n",
     "$$ u(P)=\\frac{1}{4 \\pi}\\left[\\iint_{A}+\\iint_{B}+\\iint_{C}\\right]\\left[u \\frac{\\partial}{\\partial r}\\left(\\frac{e^{-i k r}}{r}\\right) \\hat{\\mathbf{r}} \\cdot \\hat{\\mathbf{n}}-\\frac{e^{-i k r}}{r} \\nabla u \\cdot \\hat{\\mathbf{n}}\\right] d S $$\n",
     "\n",
     "Now, it is possible to show that the contribution of the surface $C$ goes to 0 as $R \\rightarrow \\infty$.\n",
     "\n",
     "Then, the above equation reduces to: \n",
     "\n",
     "$$ u(P)=\\frac{1}{4 \\pi}\\left[\\iint_{A}+\\iint_{B}\\right]\\left[u \\frac{\\partial}{\\partial r}\\left(\\frac{e^{-i k r}}{r}\\right) \\hat{\\mathbf{r}} \\cdot \\hat{\\mathbf{n}}-\\frac{e^{-i k r}}{r} \\nabla u \\cdot \\hat{\\mathbf{n}}\\right] d S $$\n",
     "\n",
     "In order to evaluate these integrals, we make the following assumptions:\n",
     "- Over the surface $B$ the field $u$ and its derivative are zero.\n",
     "- On the surface $A$, the field and its derivative has the same value as it would have had the screen been absent. \n",
     "\n",
     "These are known as Kirchoff's boundary conditions and are valid for most optical experiments. Using these conditions we obtain :\n",
     "\n",
     "$$ u(P)=\\frac{1}{4 \\pi} \\iint_{A}\\left[u \\frac{\\partial}{\\partial r}\\left(\\frac{e^{-i k r}}{r}\\right) \\hat{\\mathbf{r}} \\cdot \\hat{\\mathbf{n}}-\\frac{e^{-i k r}}{r} \\nabla u \\cdot \\hat{\\mathbf{n}}\\right] d S $$\n",
     "\n",
     "If we assume that the distance of the point $P$ from the aperture is much larger than the wavelength of the radiation, we obtain a further simplification:\n",
     "\n",
     "$$ \\frac{\\partial}{\\partial r}\\left(\\frac{e^{-i k r}}{r}\\right)=\\left(-i k-\\frac{1}{r}\\right) \\frac{e^{-i k r}}{r} \\simeq-i k \\frac{e^{-i k r}}{r} $$\n",
     "\n",
     "Thus,\n",
     "\n",
     "$$ u(P)=-\\frac{1}{4 \\pi} \\iint_{A}[i k u \\cos \\alpha+\\mathbf{\\nabla} u \\cdot \\hat{\\mathbf{n}}] \\frac{e^{-i k r}}{r} d S $$\n",
     "\n",
     "where $\\alpha$ is the angle between $\\hat{\\textbf{r}}$ and $\\hat{\\textbf{n}}$. Next, assuming the aperture is illuminated by spherical waves eminating from a point source and assuming the validity of Kirchoff's boundary consitions, we obtain $u = (A / \\rho) e^{-ik\\rho} $ on the aperture $A$. Thus,\n",
     "\n",
     "$$ \\nabla u \\cdot \\hat{\\mathbf{n}}=-A\\left(i k+\\frac{1}{\\rho}\\right) \\frac{e^{-i k \\rho}}{\\rho} \\hat{\\boldsymbol{\\rho}} \\cdot \\hat{\\mathbf{n}} \\simeq-i A k \\frac{e^{-i k \\rho}}{\\rho} \\cos \\beta $$\n",
     "\n",
     "where we assumed $k \\rho >> 1$, i.e., the distance between the source and the aperture is large compared to the wavelength of radiation. $\\beta$ represents the angle between $ \\hat{\\bf{ \\rho }} $ and $ \\hat{\\mathbf{n}} $. Substituting in the original equation we get :\n",
     "\n",
     "$$ u(P)=i k \\frac{A}{4 \\pi} \\iint_{A} \\frac{e^{-i k(r+\\rho)}}{r \\rho}(\\cos \\beta-\\cos \\alpha) d S $$ \n",
     "\n",
     "The above result, which corresponds to the illumination of the aperture by a single point source, is known as the Fresnel-Kirchoff diffraction formula. \n",
     "\n",
     "Further simplications and simpler forms :\n",
     "\n",
     "- The factor ($ cos(\\beta) - cos(\\alpha) $) is known as the obliquity factor and for most practical problems is $ \\approx 2$ :\n",
     "\n",
     "$$ u(P)=i \\frac{A k}{2 \\pi} \\iint_{A} \\frac{e^{-i k(r+\\rho)}}{r \\rho} d S $$\n",
     "\n",
     "- In most problems of interest, since the dimensions of the aperture are very small, the quantities $r$ and $\\rho$ vary little over the aperture $A$. Thus, there will be very little error if we replace $r$ and $\\rho$ in the denominator are replaced by $r'$ and $\\rho '$. These represent the distances from a conveniently chosen origin within the aperture $A$.\n",
     "\n",
     "$$ u(P)=\\frac{i A}{\\lambda} \\frac{1}{r^{\\prime} \\rho^{\\prime}} \\iint_{A} e^{-i k(r+\\rho)} d S $$"
    ]
   },
   {
    "cell_type": "markdown",
    "metadata": {},
    "source": [
     "# Fraunhofer and Fresnel diffraction\n",
     "\n",
     "In general the aforementioned derived integral is quite difficult to calculate for a point sources and one has to rely on further approximations that correspond to specific experimental conditions. We assume the $x-y$ plane to coincide with the plane of the aperture and coose a point $O$ as an origin. Let the coordinates of the points $P_0$ and $P$ be $(x_0, y_0, z_0)$ and $(x, y, z)$ respectively. Let $Q$ $(\\xi, \\eta, 0)$ represent an arbitrary point inside the aperture. \n",
     "\n",
     "$$ r=P Q=\\left[(x-\\xi)^{2}+(y-\\eta)^{2}+z^{2}\\right]^{1 / 2} $$ \n",
     "$$  =r^{\\prime}\\left[1-\\frac{2(x \\xi+y \\eta)}{r^{\\prime 2}}+\\frac{\\xi^{2}+\\eta^{2}}{r^{\\prime 2}}\\right]^{1 / 2}  $$\n",
     "\n",
     "where $r' = \\sqrt{x^2 + y^2 + z^2}$. Since the dimension of the aperture is very small compared to $r'$ and $\\rho '$, under the binomial expansion we get:\n",
     "\n",
     "$$ r=r^{\\prime}-\\frac{x \\xi+y \\eta}{r^{\\prime}}+\\left[-\\frac{(x \\xi+y \\eta)^{2}}{2 r^{\\prime 3}}+\\frac{\\xi^{2}+\\eta^{2}}{2 r^{\\prime}}\\right]+\\cdots $$\n",
     "\n",
     "And similarly,\n",
     "\n",
     "$$ \\rho=\\rho^{\\prime}-\\frac{x_{0} \\xi+y_{0} \\eta}{\\rho^{\\prime}}+\\left[-\\frac{\\left(x_{0} \\xi+y_{0} \\eta\\right)^{2}}{2 \\rho^{\\prime 3}}+\\frac{\\xi^{2}+\\eta^{2}}{2 \\rho^{\\prime}}\\right]+\\cdots $$\n",
     "\n",
     "Substituting these expressions for $r$ and $\\rho$, we obtain,\n",
     "\n",
     "$$ u(x, y, z)=\\frac{i A}{\\lambda} \\frac{\\exp \\left[-i k\\left(r^{\\prime}+\\rho^{\\prime}\\right)\\right]}{r^{\\prime} \\rho^{\\prime}} \\iint_{A} \\exp [i k f(\\xi, \\eta)] d \\xi d \\eta $$\n",
     "\n",
     "where,\n",
     "\n",
     "$$ \\begin{aligned} f(\\xi, \\eta)=&\\left(l-l_{0}\\right) \\xi+\\left(m-m_{0}\\right) \\eta \\\\ &-\\frac{1}{2}\\left[\\left(\\frac{1}{r^{\\prime}}+\\frac{1}{\\rho^{\\prime}}\\right)\\left(\\xi^{2}+\\eta^{2}\\right)-\\frac{(l \\xi+m \\eta)^{2}}{r^{\\prime}}-\\frac{\\left(l_{0} \\xi+m_{0} \\eta\\right)^{2}}{\\rho^{\\prime}}\\right]+\\cdots \\end{aligned} $$ \n",
     "\n",
     "with\n",
     "\n",
     "$$ l=x / r^{\\prime}, \\quad m=y / r^{\\prime}, \\quad l_{0}=-x_{0} / \\rho^{\\prime}, \\quad m_{0}=-y_{0} / \\rho^{\\prime} $$\n",
     "\n",
     "If $r'$ and $\\rho ' $ are so large that the quadratic terms in $\\xi$ and $\\eta$ are negligible, then we have what is known as $\\textbf{Fraunhofer diffraction}$ (also known as far-field diffraction). On the other hand, if it is necessary to retain terms that are quadratic in $\\xi$ and $\\eta$, then the corresponding pattern is said to be of $\\textbf{Fresnel diffraction}$ (also known as near-field diffraction pattern). \n",
     "\n"
    ]
   },
   {
    "cell_type": "markdown",
    "metadata": {},
    "source": [
     "# Interference pattern is the fourier transform of the slit function\n",
     "\n",
     "If we neglect the terms quadratic in $\\xi$ and $\\eta$ in the expression for $ f(\\xi , \\eta)$, then we get,\n",
     "\n",
     "$$ u(x, y, z)=C \\iint_{A} \\exp [i k(p \\xi+q \\eta)] d \\xi d \\eta $$\n",
     "\n",
     "where\n",
     "\n",
     "$$  p=l-l_{0}, \\quad q=m-m_{0}, \\quad C=\\frac{i A}{\\lambda r^{\\prime} \\rho^{\\prime}} \\exp \\left[-i k\\left(r^{\\prime}+\\rho^{\\prime}\\right)\\right]  $$\n",
     "\n",
     "Neglecting the quadratic terms essentially implies that the source and screen are at infinite distance from the aperture. The above equation implies that there is no amplitude variation along the wavefront along the plane of the aperture. If instead we have an amplitude distribution along the wavefront, then the equation is modified to,\n",
     "\n",
     "$$ u(x, y, z)=C \\iint A(\\xi, \\eta) e^{i k(p \\xi+q \\eta)} d \\xi d \\eta $$\n",
     "\n",
     "where $ A( \\xi, \\eta)$ represents the field distribution along the wavefront. The last equation shows that the Fraunhofer diffraction pattern is essentially the Fourier transform of the function $ A(\\xi, \\eta)$ which is called the slit function. "
    ]
   },
   {
    "cell_type": "markdown",
    "metadata": {},
    "source": [
     "# Interference pattern for rectangular slit\n",
     "\n",
     "Let us consider a rectangular pattern of dimensions $2a \\times 2b$. Assuming that the origin of our coordinate system is at the centre of the rectangle, the above equation takes the form :\n",
     "\n",
     "$$ u = C \\int_{-a}^{a} \\int_{-b}^{b} e^{i k(p \\xi+q \\eta)}  d \\xi d \\eta $$\n",
     "\n",
     "and carrying out the integration, we obtain:\n",
     "\n",
     "$$ u = 4 C a b \\left(\\frac{sin(kpa)}{kpa}\\right) \\left(\\frac{sin(kqb)}{kqb}\\right) $$\n",
     "\n",
     "Thus, the intensity distribution will be of the form:\n",
     "\n",
     "$$ I=I_{0}\\left(\\frac{\\sin k p a}{k p a}\\right)^{2}\\left(\\frac{\\sin k q b}{k q b}\\right)^{2} $$\n",
     "\n"
    ]
   },
   {
    "cell_type": "code",
    "execution_count": null,
    "metadata": {
     "ExecuteTime": {
      "end_time": "2019-12-03T20:47:46.557864Z",
      "start_time": "2019-12-03T20:47:46.545418Z"
     }
    },
    "outputs": [],
    "source": [
     "def slit_pattern(k, x, y, a=0.1, b=0.1):\n",
-    "    return (np.sin(k*x*a)*np.sin(k*y*b)/(k*x*a*k*y*b))**2"
+    "#    return (np.sin(k*x*a)*np.sin(k*y*b)/(k*x*a*k*y*b))**2\n",
+    "    return (np.sinc(k*x*a)*np.sinc(k*y*b))**2\n"
    ]
   },
   {
    "cell_type": "code",
    "execution_count": null,
    "metadata": {
     "ExecuteTime": {
      "end_time": "2019-12-03T20:52:11.873482Z",
      "start_time": "2019-12-03T20:52:11.849351Z"
     }
    },
    "outputs": [],
    "source": [
-    "x = np.linspace(-500, 500, 1000)\n",
+    "x = np.linspace(-50, 50, 100)\n",
     "y = x\n",
     "X,Y = np.meshgrid(x,y)\n",
     "def plot_sinc_2d(lambda_exp, a, b):\n",
     "    \"\"\"Plots the 2D sinc function corresponding to the interference pattern\n",
     "    from a slit of dimensions 2a*2b when hit by light of wavelength 10**lambda_exp.\"\"\"\n",
     "    lambda_ = 10**lambda_exp\n",
     "    k = 2 * np.pi / lambda_\n",
     "    fig, ax = plt.subplots(1, 2)\n",
-    "    intensity = slit_pattern(k, X, Y, a=a*lambda_, b=b*lambda_)\n",
+    "    intensity = slit_pattern(k, X, Y, a=a, b=b)\n",
     "    intensity/=np.max(intensity)\n",
     "    ax[0].pcolorfast(x, y, intensity)\n",
     "    ax[1].plot(x, intensity[int(0.5 * intensity.shape[1]), :])\n",
     "    fig.tight_layout()"
    ]
   },
   {
    "cell_type": "code",
    "execution_count": null,
    "metadata": {
     "ExecuteTime": {
      "end_time": "2019-12-03T20:52:13.111804Z",
      "start_time": "2019-12-03T20:52:12.593688Z"
     }
    },
    "outputs": [],
    "source": [
-    "interact(plot_sinc_2d, lambda_exp=(-9, 3, 1), a=(0.1, 10, 0.1), b=(0.1, 10, 0.1))"
+    "interact(plot_sinc_2d, lambda_exp=widgets.FloatSlider(min=-9, max=1, step=1, value=-3), a=widgets.FloatSlider(min=10, max=100, step=1, value=80), b=widgets.FloatSlider(min=10, max=100, step=1, value=80))"
    ]
   },
   {
    "cell_type": "markdown",
    "metadata": {},
    "source": [
     "## Brief explaination of fast fourier transform (?)\n",
     "\n",
     "\n",
     "---\n",
     "\n",
     "The first interactive code shown below computes the Fourier transform of the rectangular slit directly using inbuilt fft functions. After the initial animation for the rectangular slit, we show the intensity pattern obtained by fourier transformation of various different slit patterns"
    ]
   },
   {
    "cell_type": "code",
    "execution_count": null,
    "metadata": {
     "ExecuteTime": {
      "end_time": "2019-12-03T19:22:50.927495Z",
      "start_time": "2019-12-03T19:22:50.909907Z"
     }
    },
    "outputs": [],
    "source": [
     "from scipy.fftpack import *"
    ]
   },
   {
    "cell_type": "code",
    "execution_count": null,
    "metadata": {
     "ExecuteTime": {
      "end_time": "2019-12-03T19:22:51.398069Z",
      "start_time": "2019-12-03T19:22:51.354942Z"
     }
    },
    "outputs": [],
    "source": [
     "#Pupil function\n",
     "def draw_rectangle_pupil(aperture_fraction_x,\n",
     "                         aperture_fraction_y,\n",
     "                         canvas,\n",
     "                         x_pos=0.5,\n",
     "                         y_pos=0.5):\n",
     "    HEIGHT, WIDTH = canvas.shape\n",
     "    aperture_indices_x = WIDTH * np.array([\n",
     "        x_pos - 0.5 * aperture_fraction_x, x_pos + 0.5 * aperture_fraction_x\n",
     "    ])\n",
     "    aperture_indices_y = HEIGHT * np.array([\n",
     "        y_pos - 0.5 * aperture_fraction_y, y_pos + 0.5 * aperture_fraction_y\n",
     "    ])\n",
     "    masked = np.copy(canvas)\n",
     "    masked[int(aperture_indices_y[0]):int(aperture_indices_y[1]),\n",
     "          int(aperture_indices_x[0]):int(aperture_indices_x[1])] = 1\n",
     "    return masked\n",
     "def draw_circular_pupil(radius, canvas, x_pos = 0.5, y_pos = 0.5):\n",
     "    HEIGHT, WIDTH = canvas.shape\n",
     "    x = np.arange(HEIGHT)\n",
     "    y = np.arange(WIDTH)\n",
     "    X, Y = np.meshgrid(x, y)\n",
     "    x_pos_index = int(WIDTH * x_pos)\n",
     "    y_pos_index = int(WIDTH * y_pos)\n",
     "    distances = get_r(X, Y, x_pos_index, y_pos_index)\n",
     "    mask = np.copy(canvas)\n",
     "    mask[distances < radius*WIDTH] = 1\n",
     "    return mask\n",
     "def interference_from_pupil(pupil):\n",
     "    HEIGHT, WIDTH = pupil.shape\n",
     "    # Intensity\n",
     "    pupil_fft = np.abs(fft2(pupil))**2\n",
     "    # Shift frequencies\n",
     "    pupil_fft_shift = fftshift(pupil_fft)\n",
     "    # Plot\n",
     "    fig, ax = plt.subplots(1, 3, figsize=(15, 5))\n",
     "    ax[0].imshow(pupil, cmap=\"Greys_r\")\n",
     "    ax[1].imshow(np.log((pupil_fft_shift + 1))) # Log stretch\n",
     "    ax[1].set_title(\"Log stretched interference pattern.\")\n",
     "    ax[2].plot(pupil_fft_shift[int(0.5 * HEIGHT)]/np.max(pupil_fft_shift))\n",
     "    ax[2].set_title('$I/I_0$')\n",
     "    [a.set_xlabel('x [px]') for a in ax]\n",
     "    ax[0].set_ylabel('y [px]')\n",
     "    ax[1].set_ylabel('y [px]')\n",
     "    plt.tight_layout()"
    ]
   },
   {
    "cell_type": "code",
    "execution_count": null,
    "metadata": {
     "ExecuteTime": {
      "end_time": "2019-12-03T19:22:53.425676Z",
      "start_time": "2019-12-03T19:22:53.417710Z"
     }
    },
    "outputs": [],
    "source": [
     "# Canvas\n",
     "HEIGHT = 1000\n",
     "WIDTH = HEIGHT\n",
     "canvas = np.zeros([HEIGHT, WIDTH])"
    ]
   },
   {
    "cell_type": "code",
    "execution_count": null,
    "metadata": {
     "ExecuteTime": {
      "end_time": "2019-12-03T20:16:58.247778Z",
      "start_time": "2019-12-03T20:16:58.214351Z"
     }
    },
    "outputs": [],
    "source": [
     "def plot_interact_circular(r):\n",
     "    \"\"\"Plot the interference pattern for a circular aperture of radius r in \n",
     "    units of WIDTH\"\"\"\n",
     "\n",
     "    HEIGHT = 1000\n",
     "    WIDTH = HEIGHT\n",
     "    canvas = np.zeros([HEIGHT, WIDTH])\n",
     "    interference_from_pupil(draw_circular_pupil(r, canvas))\n",
     "\n",
     "\n",
     "def plot_interact_rectangular(h_x, h_y):\n",
     "    \"\"\"Plot the interference pattern for a rectangular aperture of width h_x \n",
     "    and height h_y in units of WIDTH\"\"\"\n",
     "\n",
     "    HEIGHT = 1000\n",
     "    WIDTH = HEIGHT\n",
     "    canvas = np.zeros([HEIGHT, WIDTH])\n",
     "    interference_from_pupil(draw_rectangle_pupil(h_x, h_y, canvas))\n",
     "    \n",
     "def plot_interact_slits(n_slits, d_slits, h_x, h_y):\n",
     "    \"\"\"Plot the interference pattern for n_slits slits of width h_x \n",
     "    and height h_y, separated by a distance d_slits, all in units of WIDTH\"\"\"\n",
     "    \n",
     "    HEIGHT = 1001\n",
     "    WIDTH = HEIGHT\n",
     "    canvas = np.zeros([HEIGHT, WIDTH])\n",
     "    xrange = 0.5 * (n_slits - 1) * d_slits\n",
     "    x_sources = np.linspace(0.5 - xrange, 0.5  + xrange, n_slits)\n",
     "    for x in x_sources:\n",
     "        canvas = draw_rectangle_pupil(h_x, h_y, canvas, x_pos=x, y_pos=0.5)\n",
     "    interference_from_pupil(canvas)\n",
     "\n",
     "def plot_interact_holes(n_holes, d_holes, r):\n",
     "    \"\"\"Plot the interference pattern for n_holes circular holes of radius r, \n",
     "    separated by a distance d_holes, all in units of WIDTH\"\"\"\n",
     "    \n",
     "    HEIGHT = 1000\n",
     "    WIDTH = HEIGHT\n",
     "    canvas = np.zeros([HEIGHT, WIDTH])\n",
     "    total_interval = n_holes*d_holes\n",
     "    xrange = 0.5 * (n_holes - 1) * d_holes\n",
     "    x_sources = np.linspace(0.5 - xrange, 0.5  + xrange, n_holes)\n",
     "    for x in x_sources:\n",
     "        canvas = draw_circular_pupil(r, canvas, x_pos=x, y_pos=0.5)\n",
     "    interference_from_pupil(canvas)"
    ]
   },
   {
    "cell_type": "code",
    "execution_count": null,
    "metadata": {
     "ExecuteTime": {
      "end_time": "2019-12-03T20:16:59.977289Z",
      "start_time": "2019-12-03T20:16:58.988695Z"
     }
    },
    "outputs": [],
    "source": [
     "interact(plot_interact_rectangular,\n",
     "         h_x=(0.01, 0.1, 0.01),\n",
     "         h_y=(0.01, 0.1, 0.01))"
    ]
   },
   {
    "cell_type": "code",
    "execution_count": null,
    "metadata": {
     "ExecuteTime": {
      "end_time": "2019-12-03T20:17:01.010784Z",
      "start_time": "2019-12-03T20:16:59.979775Z"
     }
    },
    "outputs": [],
    "source": [
     "interact(plot_interact_circular,\n",
     "         r=(0.01, 0.1, 0.01))"
    ]
   },
   {
    "cell_type": "code",
    "execution_count": null,
    "metadata": {
     "ExecuteTime": {
      "end_time": "2019-12-03T20:17:01.946860Z",
      "start_time": "2019-12-03T20:17:01.013129Z"
     }
    },
    "outputs": [],
    "source": [
     "interact(plot_interact_slits,\n",
     "         n_slits=(2, 10, 1),\n",
     "         d_slits=(0.01, 0.1, 0.01),\n",
     "         h_x=widgets.FloatSlider(min=0.01, max=0.1, step=0.01, value = 0.01),\n",
     "         h_y=(0.01, 0.1, 0.01))"
    ]
   },
   {
    "cell_type": "code",
    "execution_count": null,
    "metadata": {
     "ExecuteTime": {
      "end_time": "2019-12-03T20:17:02.952021Z",
      "start_time": "2019-12-03T20:17:01.953176Z"
     }
    },
    "outputs": [],
    "source": [
     "interact(plot_interact_holes,\n",
     "         n_holes=(2, 10, 1),\n",
     "         d_holes=(0.01, 0.1, 0.01),\n",
     "         r=(0.005, 0.1, 0.01))"
    ]
   },
   {
    "cell_type": "markdown",
    "metadata": {},
    "source": [
     "## Idea for flow of document:\n",
     "\n",
     "Derive Fraunhofer Intensity pattern for rectangular slit\n",
     "\n",
     "Interactive animation using the rectangular slit\n",
     "\n",
     "Other shapes\n",
     "\n",
     "---\n",
     "\n",
     "Grating Theory\n",
     "\n",
     "Grating far field\n",
     "\n",
     "Grating near field"
    ]
   },
   {
    "cell_type": "markdown",
    "metadata": {},
    "source": []
   },
   {
    "cell_type": "markdown",
    "metadata": {},
    "source": [
     "# Excerpts from task list document\n",
     "\n",
     "Interference between spherical (or circular in 2D) waves from point sources. \n",
     "\tCompute interference pattern from superposition principle for 2 sources spaced by d, showing wave fronts. Place screen at the right distance to see the fringes\n",
     "\tGeneralisation to N equidistant sources (or scatterers, or slits). Adjust distance of the screen to see the far field pattern. Or make far field image with a lens = plot angular distribution. \n",
     "\tDiffraction grating. \n",
     "    \n",
     "    \n",
     "     # ( to be discussed) Resolution vs. number of slits. Diffraction orders. \n",
     "     \n",
     " The same behaviour also seen for other particles ( Neutrons / elect"
    ]
   },
   {
    "cell_type": "markdown",
    "metadata": {},
    "source": [
     "# Old code for diffraction grating and far field pattern with theory"
    ]
   },
   {
    "cell_type": "markdown",
    "metadata": {
     "ExecuteTime": {
      "end_time": "2019-12-03T07:32:51.666982Z",
      "start_time": "2019-12-03T07:32:51.563673Z"
     }
    },
    "source": [
     "## Diffraction by a grating\n",
     "\n",
     "Diffraction is a phenomena of light encountered in wave optics which describes various phenomena that occur when light encounters an obstruction or a slit.\n",
     "\n",
     "### Definition \n",
     "\n",
     "The travel of light \n",
     "\n",
     "### Single slit diffraction pattern\n",
     "\n",
     "One classical case of diffraction is that from a single slit. In this case, light is incident as a plane wave onto the plane of the slit. The wavefront of the incident light is now modified due to the obstruction by the slit. The resultant wavefront propagates according to Huygen's principle and results in a characteristic intensity pattern on a screen placed at a long distance from the apperture. \n",
     "\n",
     "Let us first introduce some notation that will be useful in the description that follows \n",
     "\n",
     "Symbol | Meaning\n",
     "--- | ---\n",
     "$a$ | Slit width\n",
     "$k$ | Wavenumber of incident radiation\n",
     "$\\lambda$ | Wavelength of incident radiation \n",
     "$D$ | Distance between slit plane and image plane\n",
     "$\\theta$ | Angular deviation\n",
     "$m$ | Order of diffraction\n",
     "$y$ | Distance in the image plane\n",
     "$N$ | Number of slits\n",
     "$d$ | Spacing between slits\n",
     "\n",
     "![Diffraction from a single slit](http://hyperphysics.phy-astr.gsu.edu/hbase/phyopt/imgpho/sinslit.png \"Diffraction from a single slit\")\n",
     "\n",
     "For light incident at an angle $ \\theta_{i} $, the angle at wchich the the $m^{th}$ maxima occurs is determined by :\n",
     "\n",
     "$a\\left(\\sin \\theta_{i}+\\sin \\theta_{m}\\right)=m \\lambda, \\quad m=0, \\pm 1, \\pm 2, \\ldots$\n",
     "\n",
     "\n",
     "It can be shown that the intensity distribution of the pattern formed on the screen is given by :\n",
     "\n",
     "$I(\\theta)=I(0)\\left(\\frac{\\sin \\beta}{\\beta}\\right)^{2} \\quad \\beta=(k a / 2) \\sin \\theta$\n",
     "\n",
     "A diffraction grating can be modelled by an aperture consisting of multiple slits ($N$) at a regular spacing ($d$). In this case, for a beam of collimated light incident at an angle $\\alpha$, the normalised intensity of the diffracted wave is given by : \n",
     "\n",
     "$i(\\alpha, \\beta)=\\mathrm{IF} \\cdot \\mathrm{BF}=\\left(\\frac{\\sin N v^{\\prime}}{N \\sin v^{\\prime}}\\right)^{2} \\cdot\\left(\\frac{\\sin v}{v}\\right)^{2}$\n",
     "\n",
     "where the relations for the phase differences are :\n",
     "\n",
     "$2 v^{\\prime}=\\frac{2 \\pi d}{\\lambda}(\\sin \\beta+\\sin \\alpha) \\quad \\beta \\rightarrow $ Angle of reflection/refraction (depending on whether the grating is reflective or transmittive) \n",
     "\n",
     "$v=\\frac{\\pi a}{\\lambda}(\\sin \\beta+\\sin \\alpha)$\n",
     "\n",
     "We now introduce an interactive code which is aimed at simulating the diffraction patterns where the system parameters can be varied by the user.\n",
     "\n"
    ]
   },
   {
    "cell_type": "code",
    "execution_count": null,
    "metadata": {
     "ExecuteTime": {
      "end_time": "2019-12-03T19:23:03.073138Z",
      "start_time": "2019-12-03T19:23:03.058622Z"
     }
    },
    "outputs": [],
    "source": [
     "def diffraction_intensity (slit_width, wavelength, screen_distance, distance_between_slits, number_of_slits, X):\n",
     "    te1 = np.sin(np.pi*X*slit_width*10**(-6)/(wavelength*(10**-9)*screen_distance*10**(-2)))/(np.pi*X*slit_width*10**(-6)/(wavelength*(10**-9)*screen_distance*10**(-2)))\n",
     "    te2 = (np.sin(number_of_slits*np.pi*distance_between_slits*10**(-3)*X/(wavelength*(10**-9)*screen_distance*10**(-2))))/(number_of_slits*np.sin((np.pi*distance_between_slits*10**(-3)*X)/(wavelength*(10**-9)*screen_distance*10**(-2))))\n",
     "    intensity = (te1**2)*(te2**2)\n",
     "    plt.plot(X, intensity)\n",
     "    plt.xlabel(\"y (m)\")\n",
     "    plt.ylabel(\"Relative intensity\")\n",
     "    plt.show()"
    ]
   },
   {
    "cell_type": "code",
    "execution_count": null,
    "metadata": {
     "ExecuteTime": {
      "end_time": "2019-12-03T19:23:03.086435Z",
      "start_time": "2019-12-03T19:23:03.079747Z"
     }
    },
    "outputs": [],
    "source": [
     "x_axis2 = np.arange(-0.005,0.005,0.00001)\n",
     "# Recommended to star\n",
     "slit_width = 100*(10**-6)\n",
     "wavelength = 500\n",
     "screen_distance = 50*(10**-2)\n",
     "distance_between_slits= 1*10**-3\n",
     "number_of_slits = 2"
    ]
   },
   {
    "cell_type": "code",
    "execution_count": null,
    "metadata": {
     "ExecuteTime": {
      "end_time": "2019-12-03T19:23:03.479342Z",
      "start_time": "2019-12-03T19:23:03.091525Z"
     }
    },
    "outputs": [],
    "source": [
     "a = interact(diffraction_intensity, X = fixed(x_axis2), wavelength=(100, 1000, 10),  distance_between_slits=(0.1, 10, 0.01),number_of_slits=(1, 100, 1) ,   slit_width=(10, 1000, 1), screen_distance=(10, 100, 1) )\n",
     "\n",
     "a.widget.children[0].description = '$a$ ($\\mu$ m)'\n",
     "a.widget.children[1].description = '$\\lambda$ (nm)'\n",
     "a.widget.children[2].description = 'D (cm)'\n",
     "a.widget.children[3].description = 'd (mm)'\n",
     "a.widget.children[4].description = 'N'"
    ]
   },
   {
    "cell_type": "markdown",
    "metadata": {},
    "source": [
     "Note :\n",
     "\n",
     "Slit width : microns\n",
     "\n",
     "Wavelength : nanometers\n",
     "\n",
     "Distance between slits : millimeters\n",
     "\n",
     "Distance from screen : centimeters"
    ]
   },
   {
    "cell_type": "markdown",
    "metadata": {},
    "source": []
   },
   {
    "cell_type": "markdown",
    "metadata": {},
    "source": []
   },
   {
    "cell_type": "markdown",
    "metadata": {},
    "source": []
   },
   {
    "cell_type": "markdown",
    "metadata": {},
    "source": [
     "Consider a point source in 2D which emits sinusoidal waves uniformly in all directions. If the point is considered to be placed at the origin $(0,0)$, then the amplitude of the field at any point $(x,y)$ will be given by $cos(kr)$ where $ k = \\frac{2 \\pi}{\\lambda}$ and $r = \\sqrt{x^2 + y^2} $ is the distance from the origin. The animation shown below allows us to see the intensity pattern formed by the interference between multiple such sources.\n",
     "\n",
     "The distance between the souces can be changed in units of $\\lambda$ using the slider. Notice the pattern when the distance is set to integer or half integer multiples of the wavelength. "
    ]
   },
   {
    "cell_type": "code",
    "execution_count": null,
    "metadata": {
     "ExecuteTime": {
      "end_time": "2019-12-03T19:23:04.316846Z",
      "start_time": "2019-12-03T19:23:04.304222Z"
     }
    },
    "outputs": [],
    "source": [
     "xmin = -1e-1\n",
     "xmax = 1e-1\n",
     "ymin = -1e-1\n",
     "ymax = 1e-1\n",
     "grid_spacing = 1 #mm\n",
     "x = np.arange(-1e2*grid_spacing, 1e2*grid_spacing, grid_spacing) #m\n",
     "y = x #m\n",
     "X, Y = np.meshgrid(x, y) #m\n",
     "\n",
     "\n",
     "def n_slits(n, xmin=xmin, xmax=xmax, ymin=ymin, ymax=ymax, y0=0, lambda_=1.):\n",
     "    \"\"\"Compute the interference pattern for n equidistant sources from xmin\n",
     "    to xmax in units of the grid_spacing. The wavelength is also given in \n",
     "    grid_spacing units.\"\"\"\n",
     "    \n",
     "    x0 = np.linspace(xmin*grid_spacing, xmax*grid_spacing, n)\n",
     "    y0*=grid_spacing\n",
     "    final = np.zeros_like(X)\n",
     "    for i in x0:\n",
     "        final += point_source(X, Y, x0=i, y0=y0, lambda_=lambda_*grid_spacing)\n",
     "    return np.abs(final)**2"
    ]
   },
   {
    "cell_type": "code",
    "execution_count": null,
    "metadata": {
     "ExecuteTime": {
      "end_time": "2019-12-03T19:23:05.325403Z",
      "start_time": "2019-12-03T19:23:05.301437Z"
     }
    },
    "outputs": [],
    "source": [
     "def plot_point_sources(n_src, lambda_exp, y_slice, x_slice, d_sources):\n",
     "    l = 10**(lambda_exp) * grid_spacing #mm\n",
     "    lambda_ = 10 ** lambda_exp ## grid_spacings\n",
     "    # input d_sources is in lambdas\n",
     "    d_sources = float(d_sources * lambda_) # grid_spacings\n",
     "    d_sources_lambda = d_sources / lambda_ #lambdas\n",
     "    xrange = 0.5 * (n_src - 1) * d_sources #grid_spacings\n",
     "    sources = np.arange(-xrange, xrange+1, d_sources)*grid_spacing\n",
     "    fig, ax = plt.subplots(1, 3, figsize=(15, 5))\n",
     "    intensity = n_slits(n_src, lambda_=lambda_, xmin=-xrange, xmax=xrange) # Accepts quantities in grid spacings\n",
     "    ax[0].pcolorfast(x , y, intensity)\n",
     "    ax[0].set_xlabel('$x/\\lambda$')\n",
     "    ax[0].set_ylabel('$y/\\lambda$')\n",
     "    ax[0].axvline(x[x_slice],\n",
     "                  c='r',\n",
     "                  lw=3,\n",
     "                  label='x = %.2f mm' % (x[x_slice]))\n",
     "    ax[0].axhline(y[y_slice],\n",
     "                  c='magenta',\n",
     "                  lw=3,\n",
     "                  label='y = %.2f mm' % (y[y_slice]))\n",
     "    ax[0].scatter(sources*grid_spacing,\n",
     "                  np.zeros_like(sources),\n",
     "                  color='white',\n",
     "                  s=50,\n",
     "                  marker='*',\n",
     "                  label='d = %.2f$\\lambda$' %\n",
     "                  (d_sources_lambda))\n",
     "    ax[1].plot(x , intensity[y_slice, :], c='magenta')\n",
     "    ax[1].set_xlabel('$x/\\lambda$')\n",
     "    ax[2].plot(y , intensity[:, x_slice], c='r')\n",
     "    ax[2].set_xlabel('$y/\\lambda$')\n",
     "    ax[1].set_ylabel('I [a.u.]')\n",
     "    ax[2].set_ylabel('I [a.u.]')\n",
     "    ax[1].set_ylim(0, n_src**2)\n",
     "    ax[2].set_ylim(0, n_src**2)\n",
     "    ax[0].set_xlim(x[0], x[-1])\n",
     "    ax[0].legend(loc=(-0.7, 0.8))\n",
     "    for a in ax.ravel():\n",
     "        labels = a.get_xticks()\n",
     "        a.set_xticklabels([float('%.2f'%(label/l)) for label in labels])\n",
     "    labels = ax[0].get_yticks()\n",
     "    ax[0].set_yticklabels([float('%.2f'%(label/l)) for label in labels])\n",
-    "    ax[0].set_title('Zoom = %.2fX' % (lambda_))"
+    "    ax[0].set_title('Zoom = %.2fX' % (np.log10(lambda_)))"
    ]
   },
   {
    "cell_type": "markdown",
    "metadata": {},
    "source": [
     "Legend and explaination for animation :\n",
     "\n",
     "Label | Definition | Explaination\n",
     "--- | --- | ---\n",
     "n_src | Number of sources | Allows the number of sources appearing on the x-axis which are treated as point sources mentioned before\n",
     "lambda_exp | Wavelength | Allows changing of the wavelength ($\\lambda$) of the radiation emitted by the point sources\n",
     "y_slice | Cut line parallel to x-axis | Allows the definition of a line parallel to the x-axis. The intensity of the net radiation pattern along this line is displayed in the first box on the right.\n",
     "x_slice | Cut line parallel to y-axis | Allows the definition of a line parallel to the y-axis. The intensity of the net radiation pattern along this line is displayed in the second box on the right.\n",
     "xrange | Separation between point sources | Allows changing of the separation between the point sources"
    ]
   },
   {
    "cell_type": "code",
    "execution_count": null,
    "metadata": {
     "ExecuteTime": {
      "end_time": "2019-12-03T19:23:07.605321Z",
      "start_time": "2019-12-03T19:23:06.805592Z"
     }
    },
    "outputs": [],
    "source": [
     "interact(plot_point_sources,\n",
     "         n_src=widgets.IntSlider(min=1,\n",
     "                                 max=20,\n",
     "                                 step=1,\n",
     "                                 value=2,\n",
     "                                 description='N sources:'),\n",
     "         lambda_exp=widgets.FloatSlider(\n",
     "             min=1,\n",
     "             max=3,\n",
     "             step=0.1,\n",
     "             value=1.,\n",
     "             description='Zoom'),\n",
     "         y_slice=widgets.IntSlider(min=0,\n",
     "                                   max=len(y) - 1,\n",
     "                                   step=5,\n",
     "                                   value=len(y) - 1,\n",
     "                                   description='$y/\\\\lambda$ %s' % grid_spacing),\n",
     "         x_slice=widgets.IntSlider(min=0,\n",
     "                                   max=len(x) - 1,\n",
     "                                   step=5,\n",
     "                                   value=len(x)/2,\n",
     "                                   description='$x/\\\\lambda $ %s' % grid_spacing),\n",
     "         d_sources=widgets.FloatSlider(min=0.01,\n",
     "                                       max=5,\n",
     "                                       step=0.01,\n",
     "                                       value=0.8,\n",
     "                                       description='$d/\\\\lambda$'))"
    ]
   },
   {
    "cell_type": "markdown",
    "metadata": {},
    "source": [
     "# Fourier Transformed spectra\n"
    ]
   },
   {
    "cell_type": "markdown",
    "metadata": {},
    "source": [
     "## Square source"
    ]
   },
   {
    "cell_type": "markdown",
    "metadata": {},
    "source": [
     "Notice that the $\\lambda$ used in this plots is dependent on the particular intrinsic scale of the grid used, more precisely, we could identify the lattice spacing as lambda and the frequency of the light should then be $\\sim \\lambda^{-1}$.\n",
     "\n",
     "You could also think about why the Airy ring (diffraction pattern of light though a circular aperture) is not as circular as the one expected from a real diffraction pattern."
    ]
   },
   {
    "cell_type": "markdown",
    "metadata": {},
    "source": [
     "# Food for thought\n",
     "\n",
     "Extension to particles with smaller wavelengths ( Neutron / electron)"
    ]
   },
   {
    "cell_type": "code",
    "execution_count": null,
    "metadata": {},
    "outputs": [],
    "source": []
   }
  ],
  "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.3"
   },
   "latex_envs": {
    "LaTeX_envs_menu_present": true,
    "autoclose": true,
    "autocomplete": true,
    "bibliofile": "biblio.bib",
    "cite_by": "apalike",
    "current_citInitial": 1,
    "eqLabelWithNumbers": true,
    "eqNumInitial": 1,
    "hotkeys": {
     "equation": "Ctrl-E",
     "itemize": "Ctrl-I"
    },
    "labels_anchors": false,
    "latex_user_defs": false,
    "report_style_numbering": false,
    "user_envs_cfg": false
   },
   "toc": {
    "base_numbering": 1,
    "nav_menu": {},
    "number_sections": true,
    "sideBar": true,
    "skip_h1_title": false,
    "title_cell": "Table of Contents",
    "title_sidebar": "Contents",
    "toc_cell": false,
    "toc_position": {},
    "toc_section_display": true,
    "toc_window_display": false
   }
  },
  "nbformat": 4,
  "nbformat_minor": 2
 }