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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
|
{
"metadata": {
"name": "",
"signature": "sha256:bd975238ecc341317a545ed613e73ea0b105f0af115e6d7857237510924e96a0"
},
"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",
"#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",
"#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",
"#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",
"#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",
"#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",
"#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",
"#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",
"#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": {}
}
]
}
|