{
 "metadata": {
  "name": "",
  "signature": "sha256:c3dcf79a03b4887493b03eb7567c9289353e41ba9f42b1e11e4742e5d995690d"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "11: Laser"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 11.1, Page number 33"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "lamda=590*10**-9;    #wavelength of sodium D line(m)\n",
      "h=6.626*10**-34;   #planck's constant\n",
      "c=3*10**8;     #velocity of light(m/s)\n",
      "e=1.602*10**-19;  #charge of electron(eV)\n",
      "\n",
      "#Calculation\n",
      "E=h*c/lamda;   #energy of 1st excited state(J)\n",
      "E=E/e;   #energy of 1st excited state(eV)\n",
      "\n",
      "#Result\n",
      "print \"energy of 1st excited state is\",round(E,1),\"eV\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "energy of 1st excited state is 2.1 eV\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 11.2, Page number 34"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "T=250+273;   #temperature(K)\n",
      "lamda=590*10**-9;    #wavelength of sodium D line(m)\n",
      "h=6.626*10**-34;   #planck's constant\n",
      "c=3*10**8;     #velocity of light(m/s)\n",
      "k=1.38*10**-23;   #boltzmann constant\n",
      "\n",
      "#Calculation\n",
      "a=h*c/(k*T*lamda);\n",
      "N2byN1=math.exp(-a);    #ratio between atoms in 1st excited state and ground state\n",
      "\n",
      "#Result\n",
      "print \"ratio between atoms in 1st excited state and ground state is\",round(N2byN1*10**21,2),\"*10**-21\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "ratio between atoms in 1st excited state and ground state is 5.33 *10**-21\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 11.3, Page number 34"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "T=250+273;   #temperature(K)\n",
      "lamda=590*10**-9;    #wavelength of sodium D line(m)\n",
      "h=6.626*10**-34;   #planck's constant\n",
      "c=3*10**8;     #velocity of light(m/s)\n",
      "k=1.38*10**-23;   #boltzmann constant\n",
      "\n",
      "#Calculation\n",
      "a=h*c/(k*T*lamda);\n",
      "N2byN1=1/(math.exp(a)-1);    #ratio between stimulated emission and spontaneous emission\n",
      "\n",
      "#Result\n",
      "print \"ratio between stimulated emission and spontaneous emission is\",round(N2byN1*10**21,4),\"*10**-21\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "ratio between stimulated emission and spontaneous emission is 5.3298 *10**-21\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 11.4, Page number 35"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "n0=1.76;    #refractive index of ruby rod\n",
      "new0=4.3*10**14;   #frequency(Hz)\n",
      "deltav0=1.5*10**11;   #doppler broadening(Hz)\n",
      "c=3*10**8;     #velocity of light(m/s)\n",
      "tow21=4.3*10**-3;    #lifetime of spontaneous emission(s)\n",
      "tow_photon=6*10**-9;   #lifetime of photon(s)\n",
      "\n",
      "#Calculation\n",
      "a=4*math.pi**2*new0**2*n0**3/(c**3);\n",
      "N2_N1=a*tow21*deltav0/tow_photon;     #difference between excited state and ground state population(per m**3)\n",
      "\n",
      "#Result\n",
      "print \"difference between excited state and ground state population is\",round(N2_N1*10**-23,3),\"*10**23 per m**3\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "difference between excited state and ground state population is 1.584 *10**23 per m**3\n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 11.5, Page number 35"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "T=300;   #temperature(K)\n",
      "lamda=5000*10**-10;    #wavelength of light(m)\n",
      "h=6.626*10**-34;   #planck's constant\n",
      "c=3*10**8;     #velocity of light(m/s)\n",
      "k=1.38*10**-23;   #boltzmann constant\n",
      "\n",
      "#Calculation\n",
      "a=h*c/(k*T*lamda);\n",
      "N2byN1=1/(math.exp(a)-1);    #ratio between stimulated emission and spontaneous emission\n",
      "\n",
      "#Result\n",
      "print \"ratio between stimulated emission and spontaneous emission is\",round(N2byN1*10**42),\"*10**-42\"\n",
      "print \"answer varies due to rounding off errors\"\n",
      "print \"spontaneous emission is more predominant than that of stimulated emission. for stimulating emission, N2>>N1. therefore there is no amplification possibility\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "ratio between stimulated emission and spontaneous emission is 2.0 *10**-42\n",
        "answer varies due to rounding off errors\n",
        "spontaneous emission is more predominant than that of stimulated emission. for stimulating emission, N2>>N1. therefore there is no amplification possibility\n"
       ]
      }
     ],
     "prompt_number": 13
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 11.6, Page number 36"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "lamda=632.8*10**-9;    #wavelength of laser beam(m)\n",
      "h=6.626*10**-34;   #planck's constant\n",
      "c=3*10**8;     #velocity of light(m/s)\n",
      "P=2.3*10**-3;   #output power(W)\n",
      "\n",
      "#Calculation\n",
      "new=c/lamda;    #frequency of photon(Hz)\n",
      "E=h*new;    #energy of photon(J)\n",
      "El=P*60;   #energy emitted by laser(J/min)\n",
      "n=El/E;    #number of photons emitted(photons/min)\n",
      "\n",
      "#Result\n",
      "print \"number of photons emitted is\",round(n*10**-17,3),\"*10**17 photons/min\"\n",
      "print \"answer varies due to rounding off errors\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "number of photons emitted is 4.393 *10**17 photons/min\n",
        "answer varies due to rounding off errors\n"
       ]
      }
     ],
     "prompt_number": 22
    }
   ],
   "metadata": {}
  }
 ]
}