Chapter 1:INTERFERENCE AND DIFFRACTION OF LIGHT

Example number 1.1, Page number 1.35

In [18]:
#importing modules
import math
from __future__ import division

#Variable declaration
D=1                    #Distance in metre
lamda=589*10**-9       #nm to metres
d=2*10**-3             #mm to metre

#Calculation
beta=(D*lamda)/d

#Result
print"The fringe width beta=",round(beta*10**3,4),"mm"
The fringe width beta= 0.2945 mm

Example number 1.2, Page number 1.35

In [5]:
#importing modules
import math
from __future__ import division

#Variable declaration
N=3               #position
lamda=5450*10**-10      #Wawelength in Armstrong to metre
mu=1.5

#Calculation
t=(N*lamda)/(mu-1)

#Result
print"Thickness of glass plate=",round(t*10**6,2),"micron."
Thickness of glass plate= 3.27 micron.

Example number 1.3, Page number 1.36

In [18]:
#importing modules
import math
from __future__ import division

#Variable declaration
w=0.02      
n=1
lamda=6.56*10**-7
theta=(18+(14/60))*math.pi/180

#Calculation
N=(w*math.sin(theta))/(n*lamda)

#Result
print"Total number of lines n the grating=",round(N)
print"#Answer varies due to rounding of number"
Total number of lines n the grating= 9539.0
#Answer varies due to rounding of number

Example number 1.4, Page number 1.36

In [7]:
#importing modules
import math
from __future__ import division

#Variable declaration
lamda=5893*10**-10           #Angstroms to mts
x=4*10**-2
beta=1*10**-3

#Calculation
t=(lamda*x)/(2*beta)

#Result
print"t=",round(t*10**6,3),"micron"
t= 11.786 micron

Example number 1.6, Page number 1.36

In [9]:
#importing modules
import math
from __future__ import division

#Variable declaration
lamda=5500
nf=1.38

#Calculation
t=lamda/(4*nf)

#Result
print"The minimum thickness of coating,t=",round(t,1),"Angstroms"
The minimum thickness of coating,t= 996.4 Angstroms

Example number 1.7, Page number 1.37

In [1]:
#importing modules
import math
from __future__ import division

#Variable declaration
beta=0.00227     #distance between adjascent green lines
D=2.5             
d=0.0006        #distance between narrow slits

#Calculation
lamda=(beta*d)/D

#Result
print"Wavelength,lamda=",round(lamda*10**10),"*10**-10 m"
print"#Answer varies due to rounding of number"
Wavelength,lamda= 5448.0 *10**-10 m
#Answer varies due to rounding of number

Example number 1.8, Page number 1.37

In [36]:
#importing modules
import math
from __future__ import division

#Variable declaration
lamda=5890*10**-10
mu=1.5
theta=60*math.pi/180     #Converting in to degrees

#Calculation
cos=math.cos(theta)
t=(lamda)/(2*mu*(math.cos(theta)))
         
#Result
print"Smallest thickness of plate,t=",round(t*10**10),"*10**-10 m"
Smallest thickness of plate,t= 3927.0 *10**-10 m

Example number 1.9, Page number 1.37

In [5]:
#importing modules
import math
from __future__ import division

#Variable declaration
R=1
n=5
lamda=5.895*10**-7
dn=0.003

#Calculation
mu=(4*R*n*lamda)/(dn**2)

#Result
print"Refractive index,mu =",mu 
Refractive index,mu = 1.31

Example number 1.10, Page number 1.38

In [2]:
#importing modules
import math
from __future__ import division

#Variable declaration
lamda=5893;
n=3
d_lamda=6

#Calculation
N=(lamda)/(n*d_lamda)

#Result
print"N =",round(N,1)
print"The number of rulings needed is 328. This is the minimum requirement."
N = 327.4
The number of rulings needed is 328. This is the minimum requirement.

Example number 1.11, Page number 1.38

In [41]:
#importing modules
import math
from __future__ import division

#Variable declaration
lamda=5.5*10**-7
d=2.54
x=1.22
#Calculation
dtheta=(x*lamda)/d

#Result
print"Smallest angular separation of two stars =",round(dtheta*10**7,3),"*10**-7 radian" 
Smallest angular separation of two stars = 2.642 *10**-7 radian

Example number 1.12, Page number 1.38

In [49]:
#importing modules
import math
from __future__ import division

#Variable declaration
lamda=6500
theta=30*math.pi/180

#Calculation
a=lamda/math.sin(theta)

#Result
print"Slit width value, a=",a,"Angstroms =",round(a*10**-4,1),"micron"
Slit width value, a= 13000.0 Angstroms = 1.3 micron

Example number 1.13, Page number 1.38

In [3]:
#importing modules
import math
from __future__ import division

#Variable declaration
a2=1
a1=2*a2
#Calculation
r=a1/a2

#Result
print"r=",r,"/1"   #r = r/1 = r:1
print"Hence the ratio of the amplitudes= 2:1"
r= 2.0 /1
Hence the ratio of the amplitudes= 2:1

Example number 1.14, Page number 1.39

In [73]:
#importing modules
import math
from __future__ import division

#Variable declaration
theta=5*10**-3/2
lamda=5*10**-7

#Calculation
a=(lamda)/theta

print"a=",round(a*10**4),"*10**-4 m","=",a*10**3,"mm"
a= 2.0 *10**-4 m = 0.2 mm

Example number 1.15, Page number 1.39

In [76]:
#importing modules
import math
from __future__ import division

#Variable declaration
N=20
lamda=5000*10**-10       #Angstroms to meters
t=2.5*10**-5

#Calculation
mu_1=(N*lamda)/t
mu=1+(mu_1)

#Result
print"mu-1=",mu_1
print"Refractive index, mu=",mu
mu-1= 0.4
Refractive index, mu= 1.4

Example number 1.16, Page number 1.39

In [79]:
#importing modules
import math
from __future__ import division

#Variable declaration
theta=90*math.pi/180    #theta=90 degrees to get maximum number of orders assume
lamda=5890*10**-10
aplusb=2*10**-6       #micro mts to mts 

#Calculation
n=(aplusb*math.sin(theta))/lamda

#Result
print"Maximum number of orders=",round(n)
 Maximum number of orders= 3.0