-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrydberg.py
More file actions
30 lines (21 loc) · 697 Bytes
/
rydberg.py
File metadata and controls
30 lines (21 loc) · 697 Bytes
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
'''
Example 1: Rydberg Equation used in Atomic Physics to find the wavelengths of spectra lines for Hydrogen atoms.
- inputs: R, m, n, R= constant, m and n are integers representing the principle quantum numbers of the orbitals occupied BEFORE/AFTER the quantum leap
- output: invlambda, the first few transitin wavelengths of the EM radiation emitted
'''
R= 1.097e-2
for m in [1,2,3]:
print "Series for m=", m
for k in [1,2,3,4,5]: # WHERE K =5 COME FROM???
n = m+k
invlambda = R*(1/m**2-1/n**2)
print " ",1/invlambda," nm"
'''
('Series for m=', 1)
91.1577028259 nm
91.1577028259 nm
91.1577028259 nm
91.1577028259 nm
91.1577028259 nm
('Series for m=', 2)
'''