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
|
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter 18 - Electronic Transitions"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E1 - Pg 441"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Calculate the transmittance\n",
"#Initialization of variables\n",
"import math\n",
"wl=256*math.pow(10,-9) #m\n",
"t=1 #mm\n",
"C=0.050 #mol/L\n",
"T=0.16\n",
"t2=2 #mm\n",
"#calculations\n",
"E=-math.log10(T) /(C*t)\n",
"A1=-math.log10(T)\n",
"A2=E*C*t2\n",
"Tr=math.pow(10,(-A2))\n",
"#results\n",
"print '%s %.3f' %(\"Transmittance = \",Tr)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Transmittance = 0.026\n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E2 - Pg 450"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#calculate the Quenching rate constant and half life\n",
"#Initialization of variables\n",
"import math\n",
"import numpy as np\n",
"from numpy import linalg\n",
"Q=[1., 2., 3., 4., 5]\n",
"t1=[5.2, 9.4, 13.7, 18., 22.2]\n",
"t2=[1.1, 2., 2.9, 4., 4.5]\n",
"#calculations\n",
"A = np.vstack([Q, np.ones(len(Q))]).T\n",
"kqbykf=np.linalg.lstsq(A,t1)[0]\n",
"slope1=kqbykf[0] *1000.\n",
"kq=np.linalg.lstsq(A,t2)[0]\n",
"slope2=kq[0] *math.pow(10,10)\n",
"kq=slope2\n",
"kf=kq/slope1\n",
"thalf=math.log (2) /kf\n",
"#results\n",
"print '%s %.1e %s' %(\"Quenching rate constant =\",kq,\"L ml^-1 s^-1\")\n",
"print '%s %.1e %s' %(\"\\n Half life=\",thalf,\"s\")\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Quenching rate constant = 8.8e+09 L ml^-1 s^-1\n",
"\n",
" Half life= 3.4e-07 s\n"
]
}
],
"prompt_number": 2
}
],
"metadata": {}
}
]
}
|