summaryrefslogtreecommitdiff
path: root/Engineering_Physics_by_Shyam_Rajeev/Chapter5.ipynb
blob: d6e00d90ade0b8bd73aecce54cebf55880eb5b64 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
{
 "metadata": {
  "name": "",
  "signature": "sha256:766f8db46f5669c6f5759d5eab7e64f8d7d90b920fc4c9477c5cb4c2747c652e"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "5: Wave and Quantum Mechanics and X-rays"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 5.1, Page number 145"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "h = 6.63*10**-34;        #planck's constant(J)\n",
      "c = 3*10**8;           #velocity of light(m/s)\n",
      "lamda = 6328;          #wavelength of laser(angstrom)\n",
      "ev = 6.24*10**18;         #conversion factor from J to eV\n",
      "\n",
      "#Calculation\n",
      "lamda = lamda*10**-10;        #wavelength of laser(m)\n",
      "E = h*c/lamda;          #energy of photon(J)\n",
      "Eev = E*ev;               #energy of photon(eV)\n",
      "Eev = math.ceil(Eev*10**3)/10**3;   #rounding off to 3 decimals\n",
      "\n",
      "#Result\n",
      "print \"energy of photon is\",round(E/1e-19,2),\"*10**-19 J or\",Eev,\"eV\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "energy of photon is 3.14 *10**-19 J or 1.962 eV\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 5.2, Page number 145"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "lamda = 6730;       #wavelength of laser(angstrom)\n",
      "p = 1;           #output power(mW)\n",
      "h = 6.63*10**-34;        #planck's constant(J)\n",
      "c = 3*10**8;           #velocity of light(m/s)\n",
      "\n",
      "#Calculation\n",
      "p = p*10**-3;         #output power(W)\n",
      "lamda = lamda*10**-10;        #wavelength of laser(m)\n",
      "n = p*lamda/(h*c);         #number of photons(per sec)\n",
      "\n",
      "#Result\n",
      "print \"number of photons emitted is\",round(n/1e+15,2),\"*10**15 per sec\"\n",
      "print \"answer given in the book is wrong\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "number of photons emitted is 3.38 *10**15 per sec\n",
        "answer given in the book is wrong\n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 5.3, Page number 146"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "l = 3*10**-2;        #coherence length for sodium light(m)\n",
      "lamda = 5893;      #wavelength(angstrom)\n",
      "c = 3*10**8;           #velocity of light(m/s)\n",
      "\n",
      "#Calculation\n",
      "lamda = lamda*10**-10;        #wavelength(m)\n",
      "n = l/lamda;       #number of oscillations\n",
      "tc = l/c;          #coherence time(s)\n",
      "\n",
      "#Result\n",
      "print \"number of oscillations is\",round(n)\n",
      "print \"the coherence time is\",tc,\"s\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "number of oscillations is 50908.0\n",
        "the coherence time is 1e-10 s\n"
       ]
      }
     ],
     "prompt_number": 14
    }
   ],
   "metadata": {}
  }
 ]
}