{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 23: Lasers, Fibre Optics and Holography"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 1, Page 662"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "y=630*10**(-9)#y=emitted wavelength in meters\n",
      "c=3*10**8#c=velocity of light in free space in m/s\n",
      "\n",
      "#Calculations&Results\n",
      "v=c/y#v=frequency of the emitted radiation\n",
      "print \"The frequency of the emitted radiation is %.2e Hz\"%v\n",
      "h=6.62*10**(-34)#h=Planck's constant\n",
      "P=1*10**(-3)#P=output power of gas laser(given)\n",
      "n=P/(h*v)\n",
      "print \"The number of photons emitted per second is= %.2e s^-1\"%n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The frequency of the emitted radiation is 4.76e+14 Hz\n",
        "The number of photons emitted per second is= 3.17e+15 s^-1\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2, Page 663"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "V=500#V=bandwidth of a He-Ne laser in Hz\n",
      "\n",
      "#Calculations&Results\n",
      "t=1./V#t=coherence time\n",
      "print \"The coherence time is = %.f ms\"%(t*(10**3))\n",
      "c=3*10**8#c=velocity of light in m/s\n",
      "Lc=c/V#Lc=longitudinal coherence length\n",
      "print \"The longitudinal coherence length is=%.f km\"%(Lc/1000)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The coherence time is = 2 ms\n",
        "The longitudinal coherence length is=600 km\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3, Page 663"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "#To obtain interference fringes of good visibility the path difference for the central fringe must be an integral multiple of each of the 2 wavelengths.\n",
      "#2*d=(n1*y1)=(n2*y2)where y1 & y2 are 2 wave-lengths and d=path difference and n1 and n2 are 2 integers\n",
      "#(2*d)*((1/y2)-(1/y1))=(n2-n1)=m where m is another integer\n",
      "#Now m=(-2*d*Y)/(y^2)=(2*d*V)/(v*y)=(2*d*V)/c=(2*d)/Lc\n",
      "Lc=600.#Lc=coherence length in km\n",
      "\n",
      "#Calculations\n",
      "d=(Lc/2)#d=minimum difference between the 2 arms of the Michelson interferometer\n",
      "\n",
      "\n",
      "print \"The minimum difference between the two arms of the Michelson interferometer is=%.f km\"%d\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The minimum difference between the two arms of the Michelson interferometer is=300 km\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4, Page 663"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable declaration\n",
      "h=6.62*10**(-34)#h=Planck's constant\n",
      "v=3*10**8#v=velocity of light(as normal optical source is mentioned) in m/s\n",
      "kB=1.38*10**-23#kB=Boltzmann's constant\n",
      "T=1000#T=temperature in Kelvin\n",
      "w=6000#w=wavelength in Armstrong\n",
      "\n",
      "#Calculations&Results\n",
      "R=(math.exp((h*v)/(w*(10**-10)*kB*T)))-1#R=the ratio of the number of spontaneous to stimulated transitions\n",
      "print \"R=%.1e\"%R\n",
      "if (R>1):\n",
      "    print \"As the ratio of the number of spontaneous to stimulated transitions (R) is >> 1 the emission is predominantly\",\\\n",
      "    \"\\ndue to spontaneous transitions and is thus incoherent\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "R=2.6e+10\n",
        "As the ratio of the number of spontaneous to stimulated transitions (R) is >> 1 the emission is predominantly \n",
        "due to spontaneous transitions and is thus incoherent\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5, Page 663"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "u=8./(10**14)#u=(V/v)=the short term frequency stability of a He-Ne gas laser \n",
      "#v=c/y where c=velocity of light in vacuum  and y=wavelength\n",
      "c=3*10**8#c=velocity of light in m/s\n",
      "y=1153*10**(-9)#y=emitted wavelength in meters\n",
      "\n",
      "#Calculations&Results\n",
      "V=(u*c)/y\n",
      "t=1./V#t=coherence time\n",
      "print \"The coherence time is = %.f ms\"%(t*(10**3))\n",
      "Lc=c/V#Lc=coherence length\n",
      "print \"The coherence length is=%.2e m\"%Lc"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The coherence time is = 48 ms\n",
        "The coherence length is=1.44e+07 m\n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 6, Page 664"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "#y0=vacuum wavelength for the frequency v\n",
      "#c=(v*y0)\n",
      "#The deviation in the wavelength is Y0=(c*V)/(v**2)\n",
      "#Y0=((y0**2)*V)/c\n",
      "#V being spread in frequency over the linewidth.\n",
      "#V=(1/tc)\n",
      "c=3*(10**8)#c=velocity of light in m/s\n",
      "tc=10**(-8)#tc=coherence time in seconds\n",
      "y0=650*(10**(-9))#y0=vacuum wavelength in m\n",
      "\n",
      "#Calculations&Results\n",
      "Y0=(y0**2)/(c*tc)\n",
      "print \"Line width is =%.1e nm\"%(Y0/(10**-9))#Y0 is converted in terms of nm\n",
      "Lc=c*tc#Lc=coherence length\n",
      "print \"The coherence length Lc is=%.f m\"%Lc"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Line width is =1.4e-04 nm\n",
        "The coherence length Lc is=3 m\n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 7, Page 664"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable declaration\n",
      "o=5*10**-5#o=angular spread in radians\n",
      "f=10#f=focal length in cm\n",
      "\n",
      "#Calculations&Results\n",
      "D=f*o#D=diameter of the image\n",
      "r=(D/2)#r=image radius\n",
      "print \"The image radius is = %.1e cm\"%r\n",
      "a=math.pi*(r**2)#a=cross sectional area of the image in cm**2\n",
      "P=10*10**-3#P=power in Watts\n",
      "PD=P/a#PD=power density\n",
      "print \"Power density is = %.1e W/cm**2\"%PD\n",
      "y=6000*10**-8#y=wavelength in cm\n",
      "d=y/o#d=coherent width\n",
      "print \"The lateral coherent width is = %.1f cm\"%d"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The image radius is = 2.5e-04 cm\n",
        "Power density is = 5.1e+04 W/cm**2\n",
        "The lateral coherent width is = 1.2 cm\n"
       ]
      }
     ],
     "prompt_number": 13
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8, Page 664"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "h=6.62*10**-34#h=Planck's constant\n",
      "c=3*10**8#c=velocity of light in vacuum in m/s\n",
      "y=632.8*10**-9#y=emitted wavelength in m\n",
      "\n",
      "#Calculations\n",
      "E=(h*c)/y#E=emitted photon energy in Joules\n",
      "e=15.2*10**-19#e=energy of 2p level in Joules\n",
      "P=E+e#P=Pumping energy required for transition from 3s to 2p level in a He-Ne laser\n",
      "\n",
      "#Result\n",
      "print \"The desired pumping energy is = %.1f eV\"%(P/(1.6*10**-19))\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The desired pumping energy is = 11.5 eV\n"
       ]
      }
     ],
     "prompt_number": 14
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9, Page 665"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable declaration\n",
      "h=6.62*10**-34#h=Planck's constant\n",
      "v=2.4*10**15#v=frequency of emitted radiation in Hz\n",
      "c=3*10**8#c=velocity of light in vacuum in m/s\n",
      "\n",
      "#Calculations\n",
      "A21=1/(1.66*10**-8)#A21=mean spontaneous life time\n",
      "B21=((c**3)*A21)/(8*math.pi*h*(v**3))#B21=probability of stimulated emission\n",
      "\n",
      "#Result\n",
      "print \"The desired probability is = %.2e m**3/(J.s**2)\"%B21"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The desired probability is = 7.07e+18 m**3/(J.s**2)\n"
       ]
      }
     ],
     "prompt_number": 15
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 10, Page 665"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable declaration\n",
      "u1=1.55#u1=refractive index of the core of the fibre\n",
      "u2=1.50#u2=refractive index of the cladding\n",
      "\n",
      "#Calculations&Results\n",
      "oa=math.asin(math.sqrt((u1**2)-(u2**2)))#oa=acceptance angle\n",
      "print \"The acceptance angle is = %.f degrees\"%math.degrees(oa)\n",
      "NA=math.sin(oa)#NA=numerical aperture\n",
      "print \"NA=%.4f\"%NA\n",
      "oc=math.asin(u2/u1)#oc=critical angle\n",
      "print \"Critical angle=%.f degrees\"%math.degrees(oc)\n",
      "d=50*10**-6#d=core diameter in meters\n",
      "x=d*math.tan(oc)#x=axial distance traversed by the ray between two consecutive reflections\n",
      "n=1/x#n=number of reflections per metre\n",
      "print \"The number of reflections per metre is = %.f\"%n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The acceptance angle is = 23 degrees\n",
        "NA=0.3905\n",
        "Critical angle=75 degrees\n",
        "The number of reflections per metre is = 5207\n"
       ]
      }
     ],
     "prompt_number": 18
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 11, Page 665"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable declaration\n",
      "ro = 0.2  #mm\n",
      "u1 = 1.52\n",
      "\n",
      "#Calculations\n",
      "n_ro = 1.52-(2*ro**2)\n",
      "NA = math.sqrt(u1**2-n_ro**2)\n",
      "theta_A = math.degrees(math.asin(NA))\n",
      "\n",
      "#Results\n",
      "print \"Numerical Arperture = %.4f\"%NA\n",
      "print \"Acceptance angle = %.2f degrees\"%theta_A"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Numerical Arperture = 0.4866\n",
        "Acceptance angle = 29.12 degrees\n"
       ]
      }
     ],
     "prompt_number": 21
    }
   ],
   "metadata": {}
  }
 ]
}