summaryrefslogtreecommitdiff
path: root/sample_notebooks/SPANDANAARROJU/Chapter11.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'sample_notebooks/SPANDANAARROJU/Chapter11.ipynb')
-rw-r--r--sample_notebooks/SPANDANAARROJU/Chapter11.ipynb608
1 files changed, 608 insertions, 0 deletions
diff --git a/sample_notebooks/SPANDANAARROJU/Chapter11.ipynb b/sample_notebooks/SPANDANAARROJU/Chapter11.ipynb
new file mode 100644
index 00000000..d0036604
--- /dev/null
+++ b/sample_notebooks/SPANDANAARROJU/Chapter11.ipynb
@@ -0,0 +1,608 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#11: Lasers"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.1, Page number 11.55"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "intensity of laser beam is 1.5 *10**4 watt/m**2\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",
+ "P=20*10**-3; #power(watt)\n",
+ "r=1.3/2; #radius(mm)\n",
+ "\n",
+ "#Calculation\n",
+ "r=r*10**-3; #radius(m)\n",
+ "I=P/(math.pi*r**2); #intensity of laser beam(watt/m**2)\n",
+ "\n",
+ "#Result\n",
+ "print \"intensity of laser beam is\",round(I/10**4,1),\"*10**4 watt/m**2\"\n",
+ "print \"answer given in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.2, Page number 11.56"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "mode seperation in frequency is 2.5 *10**8 Hz\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "c=3*10**8; #velocity of light(m/sec)\n",
+ "L=0.6; #distance(m)\n",
+ "\n",
+ "#Calculation\n",
+ "delta_v=c/(2*L); #mode seperation in frequency(Hz)\n",
+ "\n",
+ "#Result\n",
+ "print \"mode seperation in frequency is\",delta_v/10**8,\"*10**8 Hz\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.3, Page number 11.56"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "coherence length is 1.5 *10**-2 m\n",
+ "band width is 2.0 *10**10 Hz\n",
+ "line width is 0.026 nm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "c=3*10**8; #velocity of light(m/sec)\n",
+ "delta_t=0.05*10**-9; #time(s)\n",
+ "lamda=623.8*10**-9; #wavelength(m)\n",
+ "\n",
+ "#Calculation\n",
+ "cl=c*delta_t; #coherence length(m)\n",
+ "delta_v=1/delta_t; #band width(Hz)\n",
+ "delta_lamda=lamda**2*delta_v/c; #line width(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"coherence length is\",cl*10**2,\"*10**-2 m\"\n",
+ "print \"band width is\",delta_v/10**10,\"*10**10 Hz\"\n",
+ "print \"line width is\",round(delta_lamda*10**9,3),\"nm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.4, Page number 11.56"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "energy difference is 1.96 eV\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "c=3*10**8; #velocity of light(m/sec)\n",
+ "h=6.63*10**-34; #plank's constant(Js)\n",
+ "lamda=632.8*10**-9; #wavelength(m)\n",
+ "e=1.6*10**-19; #charge(coulomb)\n",
+ "\n",
+ "#Calculation\n",
+ "E=c*h/(lamda*e); #energy difference(eV)\n",
+ "\n",
+ "#Result\n",
+ "print \"energy difference is\",round(E,2),\"eV\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.5, Page number 11.57"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 23,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "ratio of population is 8.95 *10**-32\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",
+ "c=3*10**8; #velocity of light(m/sec)\n",
+ "h=6.63*10**-34; #plank's constant(Js)\n",
+ "lamda=6928*10**-10; #wavelength(m)\n",
+ "Kb=1.38*10**-23; #boltzmann constant(J/K)\n",
+ "T=291; #temperature(K)\n",
+ "\n",
+ "#Calculation\n",
+ "delta_E=c*h/lamda;\n",
+ "N=math.exp(-delta_E/(Kb*T)); #ratio of population\n",
+ "\n",
+ "#Result\n",
+ "print \"ratio of population is\",round(N*10**32,2),\"*10**-32\"\n",
+ "print \"answer given in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.6, Page number 11.57"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 26,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "wavelength is 632 *10**-9 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "Kb=1.38*10**-23; #boltzmann constant(J/K)\n",
+ "T=330; #temperature(K)\n",
+ "delta_E=3.147*10**-19; #energy(J)\n",
+ "c=3*10**8; #velocity of light(m/sec)\n",
+ "h=6.63*10**-34; #plank's constant(Js)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda=c*h/delta_E; #wavelength(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"wavelength is\",int(lamda*10**9),\"*10**-9 m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.7, Page number 11.58"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 28,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "laser beam divergence is 0.5 *10**-3 radian\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "r1=2*10**-3; #radius(m)\n",
+ "r2=3*10**-3; #radius(m)\n",
+ "d1=2; #distance(m)\n",
+ "d2=4; #distance(m)\n",
+ "\n",
+ "#Calculation\n",
+ "delta_theta=(r2-r1)/(d2-d1); #laser beam divergence(radian)\n",
+ "\n",
+ "#Result\n",
+ "print \"laser beam divergence is\",delta_theta*10**3,\"*10**-3 radian\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.8, Page number 11.58"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "ratio of population is 1.127 *10**30\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",
+ "c=3*10**8; #velocity of light(m/sec)\n",
+ "h=6.63*10**-34; #plank's constant(Js)\n",
+ "lamda=6943*10**-10; #wavelength(m)\n",
+ "Kb=1.38*10**-23; #boltzmann constant(J/K)\n",
+ "T=300; #temperature(K)\n",
+ "\n",
+ "#Calculation\n",
+ "new=c/lamda;\n",
+ "N=math.exp(h*new/(Kb*T)); #ratio of population\n",
+ "\n",
+ "#Result\n",
+ "print \"ratio of population is\",round(N*10**-30,3),\"*10**30\"\n",
+ "print \"answer given in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.9, Page number 11.58"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "wavelength is 8632.8 angstrom\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",
+ "c=3*10**8; #velocity of light(m/sec)\n",
+ "h=6.63*10**-34; #plank's constant(Js)\n",
+ "Eg=1.44*1.6*10**-19; #band gap(J)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda=c*h/Eg; #wavelength(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"wavelength is\",round(lamda*10**10,1),\"angstrom\"\n",
+ "print \"answer given in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.10, Page number 11.59"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "energy gap is 0.8 eV\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "lamda=1.55; #wavelength(micro m)\n",
+ "\n",
+ "#Calculation\n",
+ "Eg=1.24/lamda; #energy gap(eV)\n",
+ "\n",
+ "#Result\n",
+ "print \"energy gap is\",Eg,\"eV\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.11, Page number 11.59"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "coherence length is 12 *10**3 m\n",
+ "spectral half width is 4.56 *10**-17 m\n",
+ "purity factor is 1.6 *10**10\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "c=3*10**8; #velocity of light(m/sec)\n",
+ "tow=4*10**-5; #time(sec)\n",
+ "lamda=740*10**-9; #wavelength(m)\n",
+ "\n",
+ "#Calculation\n",
+ "L=tow*c; #coherence length(m)\n",
+ "delta_lamda=lamda**2/L; #spectral half width(m)\n",
+ "Q=lamda/delta_lamda; #purity factor\n",
+ "\n",
+ "#Result\n",
+ "print \"coherence length is\",int(L/10**3),\"*10**3 m\"\n",
+ "print \"spectral half width is\",round(delta_lamda*10**17,2),\"*10**-17 m\"\n",
+ "print \"purity factor is\",round(Q/10**10,1),\"*10**10\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.12, Page number 11.59"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "ratio of emissions is 8.4 *10**4\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",
+ "new=5.9*10**14; #frequency(Hz)\n",
+ "h=6.63*10**-34; #plank's constant(Js)\n",
+ "Kb=1.38*10**-23; #boltzmann constant(J/K)\n",
+ "T=2500; #temperature(K)\n",
+ "\n",
+ "#Calculation\n",
+ "R=math.exp(h*new/(Kb*T))-1; #ratio of emissions\n",
+ "\n",
+ "#Result\n",
+ "print \"ratio of emissions is\",round(R/10**4,1),\"*10**4\"\n",
+ "print \"answer given in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.13, Page number 11.60"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "beam divergence is 1.02 *10**-4 radian\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "lamda=1.06*10**-6; #wavelength(m)\n",
+ "d=2.54*10**-2; #distance(m)\n",
+ "\n",
+ "#Calculation\n",
+ "theta=2.44*lamda/d; #beam divergence(radian)\n",
+ "\n",
+ "#Result\n",
+ "print \"beam divergence is\",round(theta*10**4,2),\"*10**-4 radian\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.14, Page number 11.60"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 23,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "number of photons/minute is 4.39 *10**17\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "P=2.3*10**-3; #power(W)\n",
+ "c=3*10**8; #velocity of light(m/sec)\n",
+ "h=6.63*10**-34; #plank's constant(Js)\n",
+ "lamda=6328*10**-10; #wavelength(m)\n",
+ "\n",
+ "#Calculation\n",
+ "n=P*lamda*60/(c*h); #number of photons/min\n",
+ "\n",
+ "#Result\n",
+ "print \"number of photons/minute is\",round(n/10**17,2),\"*10**17\""
+ ]
+ }
+ ],
+ "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
+}