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
|
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter 11:Lasers"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 11.1, Page number 11.6"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"import math\n",
"\n",
"#Variable declaration\n",
"lamda = 6943.*10**-10 #wavelength(m)\n",
"T = 300. #temperature(K)\n",
"h = 6.626*10**-34 #Planck's constant\n",
"c = 3*10**8 #velocity of light(m/s)\n",
"K = 8.61*10**-5\n",
"\n",
"#Calculations\n",
"E2_E1 = (h*c)/(lamda*1.6*10**-19) #in eV\n",
"N2_N1 = math.exp(-E2_E1/(K*T))\n",
"\n",
"#Result\n",
"print \"The relative population of two states in a ruby laser is\",round((N2_N1/1E-31),2)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The relative population of two states in a ruby laser is 8.2\n"
]
}
],
"prompt_number": 12
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 11.2, Page number 11.14"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"#Variable declaration\n",
"a1 = 4. #diameter of laser beam for distance first(m)\n",
"a2 = 6. # diameter of laser beam from second distance(m)\n",
"d1 = 1. #First distance from laser to output beam spot(m)\n",
"d2 = 2. #Second distance from laser to output beam spot(m)\n",
"\n",
"#Calculation\n",
"D = (a2-a1)/(2*(d2-d1))\n",
"\n",
"#Result\n",
"print \"Divergence =\",D,\"milliradian\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Divergence = 1.0 milliradian\n"
]
}
],
"prompt_number": 14
}
],
"metadata": {}
}
]
}
|