{
"metadata": {
"name": "",
"signature": "sha256:3ba769656e990801d788b85df0bb013daae3fbdec7e19bc6ba653a53dfdabcb2"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"4: Diffraction"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example number 4.1, Page number 91"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"\n",
"#importing modules\n",
"from __future__ import division\n",
"import math\n",
"\n",
"#Variable declaration\n",
"D = 50; #Distance between source and the screen(cm)\n",
"lamda = 6563; #Wavelength of light of parallel rays(A)\n",
"d = 0.385; #Width of the slit(mm)\n",
"n1 = 1; #Order of diffraction for first minimum\n",
"n2 = 5; #Order of diffraction for fifth minimum\n",
"\n",
"#Calculation\n",
"lamda = lamda*10**-8; #Wavelength of light of parallel rays(cm)\n",
"d = d*10**-1; #Width of the slit(cm)\n",
"#As sin(theta1) = n*lambda/d = x1/D, solving for x1\n",
"x1 = n1*lamda*D/d; #Distance from the centre of the principal maximum to the first minimum(cm)\n",
"x1 = x1*10; #Distance from the centre of the principal maximum to the first minimum(mm)\n",
"x1 = math.ceil(x1*10**3)/10**3; #rounding off the value of x1 to 3 decimals\n",
"x2 = n2*lamda*D/d; #Distance from the centre of the principal maximum to the fifth minimum(cm)\n",
"x2 = x2*10; #Distance from the centre of the principal maximum to the fifth minimum(mm)\n",
"x2 = math.ceil(x2*10**3)/10**3; #rounding off the value of x2 to 3 decimals\n",
"\n",
"#Result\n",
"print \"The Distance from the centre of the principal maximum to the first minimum is\",x1, \"mm\"\n",
"print \"The Distance from the centre of the principal maximum to the fifth minimum is\",x2, \"mm\"\n",
"\n",
"#answer for x2 given in the book is wrong"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The Distance from the centre of the principal maximum to the first minimum is 0.853 mm\n",
"The Distance from the centre of the principal maximum to the fifth minimum is 4.262 mm\n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example number 4.2, Page number 91"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"\n",
"#importing modules\n",
"from __future__ import division\n",
"import math\n",
"\n",
"#Variable declaration\n",
"D = 0.04; #Diameter of circular aperture(cm)\n",
"f = 20; #Focal length of convex lens(cm)\n",
"lamda = 6000; #Wavelength of light used(A)\n",
"\n",
"#Calculation\n",
"lamda = lamda*10**-8; #Wavelength of light used(cm)\n",
"#We have sin(theta) = 1.22*lambda/D = theta, for small theta\n",
"#For first dark ring\n",
"theta = 1.22*lamda/D; #The half angular width at central maximum(rad)\n",
"r1 = theta*f; #The half width of central maximum for first dark ring(cm)\n",
"r1 = r1*10**2;\n",
"#We have sin(theta) = 5.136*lambda/(%pi*D) = theta, for small theta\n",
"#For second dark ring\n",
"theta = 5.136*lamda/(math.pi*D); #The half angular width at central maximum(rad)\n",
"r2 = theta*f; #The half width of central maximum for second dark ring(cm)\n",
"r2 = r2*10**2;\n",
"r2 = math.ceil(r2*100)/100; #rounding off the value of r2 to 2 decimals\n",
"\n",
"#Result\n",
"print \"The radius of first dark ring is\",r1,\"*10**-2 cm\"\n",
"print \"The radius of second dark ring is\",r2,\"*10**-2 cm\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The radius of first dark ring is 3.66 *10**-2 cm\n",
"The radius of second dark ring is 4.91 *10**-2 cm\n"
]
}
],
"prompt_number": 6
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example number 4.3, Page number 92"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"\n",
"#importing modules\n",
"import math\n",
"from __future__ import division\n",
"\n",
"#Variable declaration\n",
"n = 2; #Order of diffraction\n",
"lamda = 650; #Wavelength of light used(nm)\n",
"d = 1.2*10**-3; #Distance between two consecutive slits of grating(cm)\n",
"\n",
"#Calculation\n",
"#We have sin(theta) = n*N*lambda = n*lambda/d, solving for theta\n",
"lamda = lamda*10**-9; #Wavelength of light used(m)\n",
"d = d*10**-2; #Distance between two consecutive slits of grating(m)\n",
"a=n*lamda/d;\n",
"theta = math.asin(a); #Angle at which the 650 nm light produces a second order maximum(rad)\n",
"theta = theta*57.2957795; #angle in degrees\n",
"theta = math.ceil(theta*10**2)/10**2; #rounding off the value of theta to 2 decimals\n",
"\n",
"#Result\n",
"print \"The angle at which the light produces a second order maximum is\",theta, \"degrees\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The angle at which the light produces a second order maximum is 6.22 degrees\n"
]
}
],
"prompt_number": 7
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example number 4.4, Page number 92"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"#importing modules\n",
"import math\n",
"from __future__ import division\n",
"\n",
"#Variable declaration\n",
"lamda = 650; #Wavelength of light used(nm)\n",
"N = 6000; #Number of lines per cm on grating\n",
"theta = 90; #Angle at which the highest spectral order is obtained(degrees)\n",
"\n",
"#Calculation\n",
"theta = theta*0.0174532925; #Angle at which the highest spectral order is obtained(rad)\n",
"#We have sin(theta) = n*N*lambda, solving for n\n",
"lamda = lamda*10**-9; #Wavelength of light used(m)\n",
"N = N*10**2; #Number of lines per m on grating\n",
"n = math.sin(theta)/(N*lamda); #The highest order of spectra with diffraction grating\n",
"n = math.ceil(n*10**3)/10**3; #rounding off the value of theta to 3 decimals\n",
"i,d = divmod(n, 1); #divides the value of n into integer and decimal parts where i is integer\n",
"\n",
"#Result\n",
"print \"value of n is\",n\n",
"print \"The highest order of spectra obtained with diffraction grating is\",i\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"value of n is 2.565\n",
"The highest order of spectra obtained with diffraction grating is 2.0\n"
]
}
],
"prompt_number": 8
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example number 4.5, Page number 92"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"\n",
"#importing modules\n",
"import math\n",
"\n",
"#Variable declaration\n",
"N = 4000; #Number of lines per cm on grating\n",
"#For Blue Line\n",
"lamda1 = 450; #Wavelength of blue light(nm)\n",
"n1 = 3; #Order of diffraction spectrum\n",
"#For Red Line\n",
"lamda2 = 700; #Wavelength of red light(nm)\n",
"n2 = 2; #Order of diffraction spectrum\n",
"\n",
"#Calculation\n",
"N = N*10**2; #Number of lines per m on grating\n",
"lamda1 = lamda1*10**-9; #Wavelength of blue light(m)\n",
"lamda2 = lamda2*10**-9; #Wavelength of red light(m)\n",
"#We have sin(theta) = n*N*lambda, solving for sin(theta)\n",
"sin_theta_3 = n1*N*lamda1; #Sine of angle at third order diffraction \n",
"sin_theta_2 = n2*N*lamda2; #Sine of angle at second order diffraction\n",
"\n",
"#Result\n",
"print \"Sine of angle at third order diffraction is\",sin_theta_3\n",
"print \"Sine of angle at second order diffraction is\",sin_theta_2 \n",
"#Check for overlapping\n",
"if (sin_theta_2-sin_theta_3)<0.05:\n",
" print \"The two orders overlap\"\n",
"else:\n",
" print \"The two orders do not overlap\" "
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Sine of angle at third order diffraction is 0.54\n",
"Sine of angle at second order diffraction is 0.56\n",
"The two orders overlap\n"
]
}
],
"prompt_number": 9
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example number 4.6, Page number 93"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"\n",
"#importing modules\n",
"import math\n",
"\n",
"#Variable declaration\n",
"n = 1; #Order of diffraction spectrum\n",
"N = 6000; #Number of lines per cm on diffraction grating\n",
"D = 2; #Distance of screen from the source(m)\n",
"lamda1 = 400; #Wavelength of blue light(nm)\n",
"lamda2 = 750; #Wavelength of blue light(nm)\n",
"\n",
"#Calculation\n",
"N = N*10**2; #Number of lines per m on grating\n",
"lamda1 = lamda1*10**-9; #Wavelength of blue light(m)\n",
"lamda2 = lamda2*10**-9; #Wavelength of blue light(m)\n",
"#We have sin(theta1) = n*N*lamda1, solving for theta1\n",
"theta1 = math.asin(n*N*lamda1); #Angle at first order diffraction for Blue light(rad)\n",
"theta1_d = theta1*57.2957795; #Angle at first order diffraction for Blue light(degrees)\n",
"theta2 = math.asin(n*N*lamda2); #Angle at first order diffraction for Red light(rad)\n",
"theta2_d = theta2*57.2957795; #Angle at first order diffraction for Red light(degrees)\n",
"x1 = D*math.tan(theta1); #Half width position at central maximum for blue color(m)\n",
"x2 = D*math.tan(theta2); #Half width position at central maximum for red color(m)\n",
"x = x2-x1; #width of first order spectrum on the screen(m)\n",
"x = x*10**2; #width of first order spectrum on the screen(cm)\n",
"x = math.ceil(x*10**2)/10**2; #rounding off the value of x to 2 decimals\n",
"\n",
"#Result\n",
"print \"The width of first order spectrum on the screen is\",x, \"cm\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The width of first order spectrum on the screen is 51.34 cm\n"
]
}
],
"prompt_number": 10
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example number 4.7, Page number 93"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"\n",
"#importing modules\n",
"import math\n",
"\n",
"#Variable declaration\n",
"w = 5; #Width of the grating(cm)\n",
"N = 32; #Number of lines per mm on grating\n",
"lamda = 640; #Wavelength of light(nm)\n",
"n = 2; #Order of diffraction\n",
"\n",
"#Calculation\n",
"N= N*10; #Number of lines per cm on grating\n",
"N0 = w*N; #Total number of lines on the grating\n",
"d_lambda = lamda/(n*N0); #Separation between wavelengths(nm)\n",
"\n",
"#Result\n",
"print \"The separation between wavelengths which the grating can just resolve is\",d_lambda, \"nm\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The separation between wavelengths which the grating can just resolve is 0.2 nm\n"
]
}
],
"prompt_number": 11
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example number 4.8, Page number 93"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"\n",
"#importing modules\n",
"import math\n",
"\n",
"#Variable declaration\n",
"lamda = 550; #Wavelength of light(nm)\n",
"D = 3.2; #Diameter of circular lens(cm)\n",
"f = 24; #Focal length of the lens(cm) \n",
"\n",
"#Calculation\n",
"lamda = lamda*10**-9; #Wavelength of light(m)\n",
"D = D*10**-2; #Diameter of circular lens(m)\n",
"theta_min = 1.22*lamda/D; #Minimum angle of resolution provided by the lens(rad)\n",
"#As delta_x/f = theta_min, solving for delta_x\n",
"f = f*10**-2; #Focal length of the lens(m) \n",
"delta_x = theta_min*f; #Separation of the centres of the images in the focal plane of lens(m)\n",
"delta_x = delta_x*10**6; #Separation of the centres of the images in the focal plane of lens(micro m)\n",
" \n",
"#Result\n",
"print \"The separation of the centres of the images in the focal plane is\",round(delta_x), \"micro-metre\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The separation of the centres of the images in the focal plane is 5.0 micro-metre\n"
]
}
],
"prompt_number": 12
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example number 4.9, Page number 94"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"\n",
"#importing modules\n",
"import math\n",
"from __future__ import division\n",
"\n",
"#Variable declaration\n",
"lamda = 550; #Wavelength of light(nm)\n",
"D = 20; #Diameter of objective of telescope(cm)\n",
"d = 6; #Distance of two points from the objective of telescope(km)\n",
"\n",
"#Calculation\n",
"lamda = lamda*10**-9; #Wavelength of light(m)\n",
"D = D*10**-2; #Diameter of objective of telescope(m)\n",
"d = d*10**3; #Distance of two points from the objective of telescope(m)\n",
"theta = 1.22*lamda/D; #Angular separation between two points(rad)\n",
"x = theta*d; #Linear separation between two points(m)\n",
"x = x*10**3; #Linear separation between two points(mm)\n",
"\n",
"#Result\n",
"print \"The linear separation between two points is\",x, \"mm\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The linear separation between two points is 20.13 mm\n"
]
}
],
"prompt_number": 13
},
{
"cell_type": "code",
"collapsed": false,
"input": [],
"language": "python",
"metadata": {},
"outputs": []
}
],
"metadata": {}
}
]
}