# Chapter 2 : Diffraction¶

## Example number 1 , Page number 256¶

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

#Variable declaration
theta=6*10**-3 #Angular Width
D=1            #Distance of Screen

#Calculations
Totalangularwidth=2*theta
tlw=Totalangularwidth*D*10**2

#Result
print"The Total Linear Width of central maxima is",tlw,"cm"

The Total Linear Width of central maxima is 1.2 cm


## Example number 2 , Page number 257¶

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

#Variable declaration
e=0.14  #width of the slit
y=1.6   #Distance of center of dark band from middle of central bright band
n=2     #no. of dark band
D=2     #Distance from the slit

#Calculations
lambdaa=((e*y)/(D*n))*10**5

#Result
print"The Wavelength is %i"%lambdaa,"Angstrom"

The Wavelength is 5600 Angstrom


## Example number 3 , Page number 257¶

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

#Variable declaration
lambdaa=5000*10**-8  #Wavelength
theta=30             #Angular Width

#Calculations
e=(lambdaa)/(sinetheta)

#Result
print"The Width of the slit is ",e,"cm"

The Width of the slit is  0.0001 cm


## Example number 4 , Page number 257¶

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

#Variable declaration
y=5*10**-3     #First Minima
D=2            #Distance of screen
e=0.2*10**-3   #Slit width

#Calculations
lambdaa=((e*y)/D)*10**10

#Result
print"The Wavelength is %i"%lambdaa,"Angstrom"

The Wavelength is 5000 Angstrom


## Example number 6 , Page number 258¶

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

#Variable declaration
y=0.005              #First Minima
D=1                  #Distance of screen
e=0.5*10**-2         #Slit width

#Calculations
yd=(y/D)
sinyd=(math.sin(yd))
lambdaa1=((e*sinyd)/4)*10**9
lambdaa2=((e*sinyd)/5)*10**9

#Result
print"The Wavelengths are %4.0f" %lambdaa1,"Angstrom & %4.0f"%lambdaa2,"Angstrom"

The Wavelengths are 6250 Angstrom & 5000 Angstrom


## Example number 7 , Page number 259¶

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

#Variable declaration
n=2                  #order of spectral line
theta=30             #Angular Width
invde=5000           #Inverse of diffraction element

#Calculations
lambdaa=((sinetheta)/(n*invde))*10**8

#Result
print"The Wavelength is %i"%lambdaa,"Angstrom"

The Wavelength is 5000 Angstrom


## Example number 8 , Page number 259¶

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

#Variable declaration
lambdaa=5000*10**-8   #Wavelength
invde=6000            #Diffraction element inverse

#Calculations
sinetheta1=lambdaa*invde
sinetheta3=lambdaa*invde*3
theta1=math.degrees(math.asin(sinetheta1))
theta3=math.degrees(math.asin(sinetheta3))
deltheta=theta3-theta1

#Result
print"The Angular Difference is %2.1f"%deltheta,"Degrees"

The Angular Difference is 46.7 Degrees


## Example number 9 , Page number 260¶

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

#Variable declaration
lambdaa=5000*10**-8   #Wavelength
invde=(2620/2.54)            #Diffraction element inverse

#Calculations
n=(1/(lambdaa*invde))
#Result
print"The orders visible would be %i"%n

The orders visible would be 19


## Example number 10 , Page number 260¶

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

#Variable declaration
lambdaa1=4000*10**-8     #Wavelength1
lambdaa2=7000*10**-8     #Wavelength2
invde=4000               #Diffraction element inverse

#Calculations
n1=(1/(lambdaa1*invde))
n2=(1/(lambdaa2*invde))
#Result
print"The orders visible will be from %i"%n2,"to %i"%n1,"order Spectrum"

The orders visible will be from 3 to 6 order Spectrum


## Example number 12 , Page number 262¶

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

#Variable declaration
lambdaa=5000*10**-8     #Wavelength
theta=30                 #Angular Width

#Calculations

#Result
print" The number of line cm in grating is",invde

 The number of line cm in grating is 5000.0


## Example number 13 , Page number 263¶

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

#Variable declaration
lambdaa=6000*10**-8     #Wavelength
sinetheta=(3/4)         #Angular Width
n=4

#Calculations
gratingele=((n*lambdaa)/sinetheta)
#Result
print" The grating element is",gratingele,"cm"

 The grating element is 0.00032 cm


## Example number 14 , Page number 263¶

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

#Variable declaration
lambdaa=6000*10**-8     #Wavelength
n=3
invde=200               #inverse of diffraction element

#Calculations
sinetheta=(n*lambdaa*invde)
#Result
print" The Angle of Diffraction is %1.2f"%theta,"degrees"

#Note:The second part of problem is theoretical and hence is not solved

 The Angle of Diffraction is 2.06 degrees


## Example number 15 , Page number 264¶

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

#Variable declaration
lambdaa=5000*10**-10     #Wavelength
theta=30                 #Angular Width
dtheta=0.01

#Calculations

#Result
print" The difference between the two wavelengths is %2.1f"%dlambda,"Angstrom"

 The difference between the two wavelengths is 86.6 Angstrom


## Example number 16 , Page number 265¶

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

#Variable declaration
lambdaa=5000*10**-8     #Wavelength
N=40000                 #Grating lines
de=12.5*10**-5          #Diffraction element

#Calculations
RPmax=((de*N)/lambdaa)

#Result
print" The Maximum resolving power is %i"%RPmax,"or 10**5"

 The Maximum resolving power is 100000 or 10**5


## Example number 17 , Page number 265¶

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

#Variable declaration
lambdaa=5890              #Wavelength
dlambdaa=6                #Difference in wavelengths
n=2                       #order

#Calculations
N=((lambdaa)/(n*dlambdaa))

#Result
print" The Minimum number of lines in the grating are %3.0f"%N

 The Minimum number of lines in the grating are 491


## Example number 18 , Page number 265¶

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

#Variable declaration
lambdaa=5896               #Wavelength
N=60000                    #Total Number of lines in 10 cm
n1=2                       #order
n2=3                       #order

#Calculations
RP=n1*N
dlambda=((lambdaa)/(n2*N))

#Result
print" (a)The resolving power in second order is",RP
print" (b) The smallest wavelength that can be resolved in the 3rd order in 5896 Angstrom wavelength region is %0.4f"%dlambda,"Angstrom"

 (a)The resolving power in second order is 120000
(b) The smallest wavelength that can be resolved in the 3rd order in 5896 Angstrom wavelength region is 0.0328 Angstrom

In [ ]: