# Chapter 45 GRATING AND SPECTRA¶

## Example 45.1 Calculation of angle¶

In [1]:
from __future__ import division
import math
m=1
lamda=4000 #in A
d=31700 #in A
theta=math.degrees(math.asin((m*lamda)/d))
print("The first order diffraction pattern in degree= %.3f"%theta)
The first order diffraction pattern in degree= 7.249

## Example 45.2 Calculation of angle theta¶

In [2]:
from __future__ import division
import math
m=1
lamda=5890  #in A
d=25400     #in A
theta=math.degrees(math.asin((m*lamda)/d))
print("(A) The first order diffraction pattern in degree= %.3f"%theta)
del_lambda=5.9 #in A
delta_theta=(m*(del_lambda))/(d*(math.cos(theta*math.pi/180)))
print("(B) Angle of seperation in degree= %.7f"%delta_theta)
(A) The first order diffraction pattern in degree= 13.408
(B) Angle of seperation in degree= 0.0002388

## Example 45.3 Calculation of Sodium Doublet¶

In [3]:
from __future__ import division
lamda=5890 #A
lamda_1=5895.9 #A
m=3
delta_lambda=(lamda_1-lamda) #in A
R=lamda/(delta_lambda)
print("Resolving power= %.3f"%R)
N=(R/m)
print("Number of rulings needed is= %.3f"%N)
Resolving power= 998.305
Number of rulings needed is= 332.768

## Example 45.4 Calculation of Dispersion¶

In [4]:
from __future__ import division
import math
m=3
m1=5
lamda=5460  #in A
d=31700  #in A
theta=math.degrees(math.asin((m*lamda)/d))
print("The first order diffraction pattern in degree= %.5f"%theta)
D=m/(d*math.cos(theta*math.pi/180))
print("(A) The dispersion in radian/A= %.7f"%D)
N=8000
lamda=5460
R=N*m1
delta_lambda=lamda/R
print("(B) Wave length difference in A= %.5f"%delta_lambda)
The first order diffraction pattern in degree= 31.11244
(A) The dispersion in radian/A= 0.0001105
(B) Wave length difference in A= 0.13650

## Example 45.5 Calculation of Angles¶

In [5]:
from __future__ import division
import math
a_o=5.63  #A
d=a_o/math.sqrt(5)
lamda=1.10 #in A
print("Interplanar spacing d in A= %.5f"%d)
print("Diffracted beam occurs when m=1,m=2 and m=3")
m1=1
x=(m1*lamda)/(2*d)
theta_1=math.degrees(math.asin(x))
print("When m1=1, Theta in degree= %.5f"%theta_1)
m2=2
x=(m2*lamda)/(2*d)
theta_2=math.degrees(math.asin(x))
print('When m1=2, Theta in degree= %.5f'%theta_2)
m3=3
x=(m3*lamda)/(2*d)
theta_3=math.degrees(math.asin(x))
print('When m1=3, Theta in degree= %.5f'%theta_3)
Interplanar spacing d in A= 2.51781
Diffracted beam occurs when m=1,m=2 and m=3
When m1=1, Theta in degree= 12.61763
When m1=2, Theta in degree= 25.90544
When m1=3, Theta in degree= 40.94473