{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#4: Wave Optics"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 4.1, Page number 92"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The wavelength of light used is 640 nm\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "n=125;   #number of fingers cross the field of view\n",
    "d=0.04*10**-3;   #distance of one of mirror moved(m)\n",
    "\n",
    "#Calculation\n",
    "w=2*d/n;     #wavelength of light used(m)\n",
    "\n",
    "#Result\n",
    "print \"The wavelength of light used is\",int(w*10**9),\"nm\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 4.2, Page number 92"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The wavelength of light used is 600.0 nm\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "Ri=1.5;      #refractive index of thin film of glass\n",
    "n=30;     #number of fringes of sodium light is observed across the field of view\n",
    "t=0.018*10**-3;    #thickness of glass film(m)\n",
    "\n",
    "#Calculation\n",
    "w=2*(Ri-1)*t/n;     #wavelength of the light used(m)\n",
    "\n",
    "#Result\n",
    "print \"The wavelength of light used is\",w*10**9,\"nm\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 4.3, Page number 92"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The wavelength of the monochromatic source used is 589.0 nm\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "n=200;     #number of fringes cross the field of view\n",
    "d=0.0589*10**-3;     #distance of mirror displaced(m)\n",
    "\n",
    "#Calculation\n",
    "w=2*d/n;     #wavelength of the monochromatic source used(m)\n",
    "\n",
    "#Result\n",
    "print \"The wavelength of the monochromatic source used is\",w*10**9,\"nm\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 4.4, Page number 92"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "collapsed": false,
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The thickness of the film is 1.9636 *10**-4 m\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "x=1.55;    #refractive index of transparent film of glass \n",
    "w=480*10**-9;   #wavelength of light(m)\n",
    "n=450;    #number of fringes to sweep across the field\n",
    "\n",
    "#Calculation\n",
    "t=n*w/(2*(x-1));    #thickness of the film(m)\n",
    "\n",
    "#Result\n",
    "print \"The thickness of the film is\",round(t*10**4,4),\"*10**-4 m\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 4.5, Page number 93"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The refractive index of material is 1.675\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "t=0.004*10**-2;    #thickness of transparent sheet(m)\n",
    "d=0.0027*10**-2;   #distance of mirror displaced(m)\n",
    "\n",
    "#Calculation\n",
    "X=(d/t)+1;    #refractive index of the material\n",
    "\n",
    "#Result\n",
    "print \"The refractive index of material is\",X"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 4.6, Page number 93"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The number of fringes shifted across the cross wire of eye piece of the telescope is 110\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "d=0.03205*10**-3;   #distance of movable mirror displaced(m)\n",
    "w=580.9*10**-9;     #wavelength of light(m)\n",
    "\n",
    "#Calculation\n",
    "n=2*d/w;     #number of fringes shifted across the cross wire of eye piece of the telescope\n",
    "\n",
    "#Result\n",
    "print \"The number of fringes shifted across the cross wire of eye piece of the telescope is\",int(n)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 4.7, Page number 101"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The thickness of a quarter wave plate of quartz for sodium light is 7.36625 micro m\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "w=5893*10**-10;   #wavelength of sodium light(m)\n",
    "Re=1.5532;     #Refractive index of quartz for e ray\n",
    "Ro=1.5332;     #Refractive index of quartz for o ray\n",
    "\n",
    "#Calculation\n",
    "t=w/(4*(Re-Ro));     #thickness of a quarter wave plate of quartz for sodium light(m)\n",
    "\n",
    "#Result\n",
    "print \"The thickness of a quarter wave plate of quartz for sodium light is\",t*10**6,\"micro m\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 4.8, Page number 102"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The thickness of a double refracting crystal required at w/2 is 2.727 micro m\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "w=6000*10**-10;    #wavelength(m)\n",
    "Re=1.54;    #Refractive index of double refracting crystal for e ray\n",
    "Ro=1.65;    #Refractive index of double refracting crystal for o ray\n",
    "\n",
    "#Calculation\n",
    "t=w/(2*(Ro-Re));     #thickness of a double refracting crystal required  at w/2(m)\n",
    "\n",
    "#Result\n",
    "print \"The thickness of a double refracting crystal required at w/2 is\",round(t*10**6,3),\"micro m\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 4.9, Page number 102"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The least thickness of a plate when the emergent beam will be plane polarised is 9.54 micro m\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "w=5*10**-7;    #wavelength(m)\n",
    "Re=1.5573;     #Refractive index for e ray when the emergent beam will be plane polarised\n",
    "Ro=1.5442;     #Refractive index for o ray when the emergent beam will be plane polarised\n",
    "\n",
    "#Calculation\n",
    "t=w/(4*(Re-Ro));    #least thickness of a plate(m)\n",
    "\n",
    "#Result\n",
    "print \"The least thickness of a plate when the emergent beam will be plane polarised is\",round(t*10**6,2),\"micro m\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 4.10, Page number 102"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The thickness of the quarter wave plate for calcite is 1.713 *10**-6 m\n",
      "answer given in the book is wrong\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "w=5893*10**-10;    #wavelength of sodium light(m)\n",
    "Ro=1.658;       #Refractive index of calcite for o ray\n",
    "Re=1.486;       #Refractive index of calcite for e ray\n",
    "\n",
    "#Calculation\n",
    "t=w/(2*(Ro-Re));      #thickness of the quarter wave plate for calcite(m)\n",
    "\n",
    "#Result\n",
    "print \"The thickness of the quarter wave plate for calcite is\",round(t*10**6,3),\"*10**-6 m\"\n",
    "print \"answer given in the book is wrong\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 4.11, Page number 102"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The wavelength for which it can act as a half wave plate is 600.0 *10**-9 m\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "t=30*10**-6;     #thickness of wave plate(m)\n",
    "Ro=1.55;      #Refractive index of wave plate for o ray\n",
    "Re=1.54;      #Refractive index of wave plate for e ray\n",
    "\n",
    "#Calculation\n",
    "w=2*t*(Ro-Re);      #wavelength for which it can act as a half wave plate(m)\n",
    "\n",
    "#Result\n",
    "print \"The wavelength for which it can act as a half wave plate is\",w*10**9,\"*10**-9 m\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 4.12, Page number 102"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The thickness of a mica sheet required for making a half wave plate for a light is 4.5508 *10**-5 m\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "w=546.1*10**-9;    #wavelength of light(m)\n",
    "Re=1.592;      #Refractive index of mica for e ray\n",
    "Ro=1.586;      #Refractive index of mica for o ray\n",
    "\n",
    "#Calculation\n",
    "t=w/(2*(Re-Ro));    #thickness of a mica sheet(m)\n",
    "\n",
    "#Result\n",
    "print \"The thickness of a mica sheet required for making a half wave plate for a light is\",round(t*10**5,4),\"*10**-5 m\""
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}