{ "metadata": { "name": "", "signature": "sha256:04df0fd624434d43d67fac6cabd770a44e2109835e3a6832f168a8a4e92f27c9" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "10: Lasers" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example number 10.1, Page number 10.6" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#importing modules\n", "import math\n", "from __future__ import division\n", "\n", "#Variable declaration\n", "c = 3*10**8 #speed of light(m/sec)\n", "h = 6.6*10**-34 #planck's constant\n", "e = 1.6*10**-19\n", "T = 300 #temperature(K)\n", "K = 8.61*10**-5\n", "lamda = 6943 #wavelength, angstrom\n", "\n", "#Calculation\n", "lamda = lamda*10**-10 #wavelength(m)\n", "#let E2 - E1 be E\n", "E = h*c/lamda #energy(J)\n", "E = E/e #energy(eV)\n", "#let population ratio N2/N1 be N\n", "N = math.exp(-E/(K*T));\n", "\n", "#Result\n", "print \"relative population of 2 states is\",round(N/1e-30,3),\"*10^-30\"\n", "print \"answer given in the book is wrong\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "relative population of 2 states is 1.076 *10^-30\n", "answer given in the book is wrong\n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example number 10.2, Page number 10.14" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#importing modules\n", "import math\n", "from __future__ import division\n", "\n", "#Variable declaration\n", "a2 = 6 #spot diameter(mm)\n", "a1 = 4 #spot diameter(mm)\n", "d2 = 2 #distance from laser(m)\n", "d1 = 1 #distance from laser(m)\n", "\n", "#Calculation\n", "a2 = a2*10**-3 #spot diameter(m)\n", "a1 = a1*10**-3 #spot diameter(m)\n", "theta = (a2-a1)/(2*(d2-d1)) #divergence(radian)\n", "theta = theta*10**3 #divergence(milli radian)\n", "\n", "#Result\n", "print \"divergence is\",theta,\"milli radian\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "divergence is 1.0 milli radian\n" ] } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example number 10.3, Page number 10.46" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#importing modules\n", "import math\n", "from __future__ import division\n", "\n", "#Variable declaration\n", "n = 1 #for air\n", "lamda = 650 #wavelength(nm)\n", "bs = 1 #beam size(mm)\n", "fl = 1 #focal length of lens(mm)\n", "\n", "#Calculation\n", "lamda = lamda*10**-9 #wavelength(m)\n", "bs = bs*10**-3 #beam size(m)\n", "fl = fl*10**-3 #focal length of lens(m)\n", "tan_theta = fl/(2*bs) #value of tan_theta\n", "theta = math.atan(tan_theta)\n", "NA = n*math.sin(theta)\n", "NA = math.ceil(NA*10**2)/10**2; #rounding off to 2 decimals\n", "ss = 0.6*lamda/NA #spot size(m)\n", "ss = ss*10**6; #spot size(micro metre)\n", "ss = math.ceil(ss*10**3)/10**3; #rounding off to 4 decimals\n", "\n", "#Result\n", "print \"spot size is\",ss,\"micro metre\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "spot size is 0.867 micro metre\n" ] } ], "prompt_number": 6 } ], "metadata": {} } ] }