Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Ok-landscape
GitHub Repository: Ok-landscape/computational-pipeline
Path: blob/main/latex-templates/templates/optics/interference_patterns.tex
51 views
unlisted
1
\documentclass[a4paper, 11pt]{article}
2
\usepackage[utf8]{inputenc}
3
\usepackage[T1]{fontenc}
4
\usepackage{amsmath, amssymb}
5
\usepackage{graphicx}
6
\usepackage{siunitx}
7
\usepackage{booktabs}
8
\usepackage[makestderr]{pythontex}
9
10
\title{Optics: Interference Patterns and Analysis}
11
\author{Computational Science Templates}
12
\date{\today}
13
14
\begin{document}
15
\maketitle
16
17
\section{Introduction}
18
Interference phenomena demonstrate the wave nature of light through the superposition of coherent waves. This analysis explores Young's double-slit experiment, multiple-beam interference, Michelson interferometry, and Fabry-P\'erot cavities, examining both intensity patterns and their applications in metrology and spectroscopy.
19
20
\section{Mathematical Framework}
21
22
\subsection{Two-Beam Interference}
23
For two coherent beams with amplitudes $E_1$ and $E_2$ and phase difference $\delta$:
24
\begin{equation}
25
I = I_1 + I_2 + 2\sqrt{I_1 I_2}\cos\delta
26
\end{equation}
27
28
\subsection{Double-Slit with Diffraction}
29
The intensity pattern for double-slit interference with single-slit diffraction:
30
\begin{equation}
31
I(\theta) = I_0 \left(\frac{\sin\beta}{\beta}\right)^2 \cos^2\alpha
32
\end{equation}
33
where $\alpha = \frac{\pi d \sin\theta}{\lambda}$ (interference) and $\beta = \frac{\pi a \sin\theta}{\lambda}$ (diffraction).
34
35
\subsection{Multiple-Beam Interference}
36
For N slits (grating), the intensity is:
37
\begin{equation}
38
I = I_0 \left(\frac{\sin\beta}{\beta}\right)^2 \left(\frac{\sin N\alpha}{\sin\alpha}\right)^2
39
\end{equation}
40
41
\subsection{Fabry-P\'erot Interferometer}
42
Transmission of a Fabry-P\'erot cavity:
43
\begin{equation}
44
T = \frac{1}{1 + F\sin^2(\delta/2)}
45
\end{equation}
46
where $F = \frac{4R}{(1-R)^2}$ is the finesse coefficient and $\delta = \frac{4\pi n d \cos\theta}{\lambda}$.
47
48
\section{Environment Setup}
49
\begin{pycode}
50
import numpy as np
51
import matplotlib.pyplot as plt
52
plt.rc('text', usetex=True)
53
plt.rc('font', family='serif')
54
55
def save_plot(filename, caption=""):
56
plt.savefig(filename, bbox_inches='tight', dpi=150)
57
print(r'\begin{figure}[htbp]')
58
print(r'\centering')
59
print(r'\includegraphics[width=0.95\textwidth]{' + filename + '}')
60
if caption:
61
print(r'\caption{' + caption + '}')
62
print(r'\end{figure}')
63
plt.close()
64
\end{pycode}
65
66
\section{Young's Double-Slit Experiment}
67
\begin{pycode}
68
# Physical parameters
69
wavelength = 632.8e-9 # He-Ne laser (m)
70
d = 0.5e-3 # Slit separation (m)
71
a = 0.1e-3 # Slit width (m)
72
L = 2.0 # Screen distance (m)
73
74
# Angular range
75
theta = np.linspace(-0.01, 0.01, 1000)
76
theta[theta == 0] = 1e-10 # Avoid division by zero
77
78
# Phase terms
79
alpha = np.pi * d * np.sin(theta) / wavelength
80
beta = np.pi * a * np.sin(theta) / wavelength
81
82
# Intensity patterns
83
I_interference = np.cos(alpha)**2
84
I_diffraction = (np.sin(beta) / beta)**2
85
I_total = I_diffraction * I_interference
86
87
# Screen position
88
x = L * np.tan(theta) * 1000 # mm
89
90
# Find fringe spacing
91
fringe_spacing = wavelength * L / d * 1000 # mm
92
93
# Create plots
94
fig, axes = plt.subplots(2, 2, figsize=(10, 8))
95
96
# Plot 1: Full pattern
97
axes[0, 0].plot(x, I_total, 'b-', linewidth=1)
98
axes[0, 0].plot(x, I_diffraction, 'r--', linewidth=1.5, alpha=0.7, label='Diffraction envelope')
99
axes[0, 0].set_xlabel('Position on screen (mm)')
100
axes[0, 0].set_ylabel('Intensity (normalized)')
101
axes[0, 0].set_title('Double-Slit Interference Pattern')
102
axes[0, 0].legend()
103
axes[0, 0].set_xlim([-15, 15])
104
axes[0, 0].grid(True, alpha=0.3)
105
106
# Plot 2: Central region zoom
107
axes[0, 1].plot(x, I_total, 'b-', linewidth=1.5)
108
axes[0, 1].set_xlabel('Position on screen (mm)')
109
axes[0, 1].set_ylabel('Intensity (normalized)')
110
axes[0, 1].set_title('Central Fringes')
111
axes[0, 1].set_xlim([-5, 5])
112
axes[0, 1].grid(True, alpha=0.3)
113
114
# Plot 3: 2D intensity pattern
115
x_2d = np.linspace(-15, 15, 400)
116
y_2d = np.linspace(-5, 5, 200)
117
X, Y = np.meshgrid(x_2d, y_2d)
118
119
# Convert to angle
120
theta_2d = np.arctan(X / 1000 / L)
121
alpha_2d = np.pi * d * np.sin(theta_2d) / wavelength
122
beta_2d = np.pi * a * np.sin(theta_2d) / wavelength
123
beta_2d[beta_2d == 0] = 1e-10
124
125
I_2d = (np.sin(beta_2d) / beta_2d)**2 * np.cos(alpha_2d)**2
126
127
axes[1, 0].imshow(I_2d, extent=[-15, 15, -5, 5], cmap='hot', aspect='auto')
128
axes[1, 0].set_xlabel('Position (mm)')
129
axes[1, 0].set_ylabel('Vertical position (mm)')
130
axes[1, 0].set_title('2D Interference Pattern')
131
132
# Plot 4: Comparison of slit widths
133
slit_widths = [0.05e-3, 0.1e-3, 0.2e-3]
134
colors = ['blue', 'green', 'red']
135
for aw, color in zip(slit_widths, colors):
136
beta_w = np.pi * aw * np.sin(theta) / wavelength
137
I_w = (np.sin(beta_w) / beta_w)**2
138
axes[1, 1].plot(x, I_w, color=color, linewidth=1.5,
139
label=f'$a = {aw*1e6:.0f}$ $\\mu$m')
140
141
axes[1, 1].set_xlabel('Position on screen (mm)')
142
axes[1, 1].set_ylabel('Intensity (normalized)')
143
axes[1, 1].set_title('Diffraction Envelope vs Slit Width')
144
axes[1, 1].legend()
145
axes[1, 1].set_xlim([-15, 15])
146
axes[1, 1].grid(True, alpha=0.3)
147
148
plt.tight_layout()
149
save_plot('double_slit.pdf', "Young's double-slit interference with diffraction envelope and 2D pattern.")
150
151
# Calculate number of fringes in central maximum
152
n_fringes = int(2 * d / a)
153
\end{pycode}
154
155
\section{Multiple-Slit Interference (Diffraction Grating)}
156
\begin{pycode}
157
# N-slit interference patterns
158
N_values = [2, 5, 10, 20]
159
colors_N = ['blue', 'green', 'orange', 'red']
160
161
# Angular range for grating
162
theta_g = np.linspace(-0.005, 0.005, 2000)
163
alpha_g = np.pi * d * np.sin(theta_g) / wavelength
164
x_g = L * np.tan(theta_g) * 1000
165
166
fig, axes = plt.subplots(2, 2, figsize=(10, 8))
167
168
# Plot 1: Comparison of N-slit patterns
169
for N, color in zip(N_values, colors_N):
170
# N-slit interference function
171
I_N = np.where(np.abs(np.sin(alpha_g)) < 1e-10,
172
N**2,
173
(np.sin(N * alpha_g) / np.sin(alpha_g))**2)
174
I_N = I_N / N**2 # Normalize
175
176
axes[0, 0].plot(x_g, I_N, color=color, linewidth=1, label=f'$N = {N}$', alpha=0.8)
177
178
axes[0, 0].set_xlabel('Position on screen (mm)')
179
axes[0, 0].set_ylabel('Intensity (normalized)')
180
axes[0, 0].set_title('N-Slit Interference Patterns')
181
axes[0, 0].legend()
182
axes[0, 0].set_xlim([-3, 3])
183
axes[0, 0].grid(True, alpha=0.3)
184
185
# Plot 2: Principal and secondary maxima
186
N = 10
187
alpha_detail = np.linspace(-0.5 * np.pi, 2.5 * np.pi, 1000)
188
I_detail = np.where(np.abs(np.sin(alpha_detail)) < 1e-10,
189
N**2,
190
(np.sin(N * alpha_detail) / np.sin(alpha_detail))**2)
191
I_detail = I_detail / N**2
192
193
axes[0, 1].plot(alpha_detail/np.pi, I_detail, 'b-', linewidth=1.5)
194
axes[0, 1].axhline(y=1/N**2, color='red', linestyle='--', alpha=0.5, label='Secondary maxima')
195
axes[0, 1].set_xlabel('$\\alpha/\\pi$')
196
axes[0, 1].set_ylabel('Intensity (normalized)')
197
axes[0, 1].set_title(f'Principal and Secondary Maxima ($N = {N}$)')
198
axes[0, 1].legend()
199
axes[0, 1].grid(True, alpha=0.3)
200
201
# Plot 3: Resolution criterion
202
# Resolving two wavelengths
203
lambda1 = 589.0e-9 # Na D1
204
lambda2 = 589.6e-9 # Na D2
205
N_res = 100
206
207
theta_res = np.linspace(-0.001, 0.001, 2000)
208
alpha1 = np.pi * d * np.sin(theta_res) / lambda1
209
alpha2 = np.pi * d * np.sin(theta_res) / lambda2
210
x_res = L * np.tan(theta_res) * 1000
211
212
I1 = np.where(np.abs(np.sin(alpha1)) < 1e-10, N_res**2,
213
(np.sin(N_res * alpha1) / np.sin(alpha1))**2)
214
I2 = np.where(np.abs(np.sin(alpha2)) < 1e-10, N_res**2,
215
(np.sin(N_res * alpha2) / np.sin(alpha2))**2)
216
217
axes[1, 0].plot(x_res, I1/N_res**2, 'b-', linewidth=1.5, label=f'$\\lambda_1 = {lambda1*1e9:.1f}$ nm')
218
axes[1, 0].plot(x_res, I2/N_res**2, 'r-', linewidth=1.5, label=f'$\\lambda_2 = {lambda2*1e9:.1f}$ nm')
219
axes[1, 0].plot(x_res, (I1 + I2)/(2*N_res**2), 'k--', linewidth=1, alpha=0.5, label='Sum')
220
axes[1, 0].set_xlabel('Position on screen (mm)')
221
axes[1, 0].set_ylabel('Intensity (normalized)')
222
axes[1, 0].set_title(f'Sodium D-lines Resolution ($N = {N_res}$)')
223
axes[1, 0].legend(fontsize=8)
224
axes[1, 0].grid(True, alpha=0.3)
225
226
# Plot 4: Angular width of principal maximum
227
N_width = np.arange(2, 101)
228
angular_width = 2 * wavelength / (N_width * d) * 180 / np.pi * 3600 # arcseconds
229
230
axes[1, 1].loglog(N_width, angular_width, 'g-', linewidth=2)
231
axes[1, 1].set_xlabel('Number of slits $N$')
232
axes[1, 1].set_ylabel('Angular width (arcsec)')
233
axes[1, 1].set_title('Principal Maximum Width vs $N$')
234
axes[1, 1].grid(True, alpha=0.3, which='both')
235
236
plt.tight_layout()
237
save_plot('multiple_slit.pdf', 'Multiple-slit interference: N-slit patterns, resolution, and angular width.')
238
\end{pycode}
239
240
\section{Michelson Interferometer}
241
\begin{pycode}
242
# Michelson interferometer simulation
243
def michelson_intensity(d_mirror, wavelength, n=1):
244
"""Intensity at detector for mirror displacement d."""
245
delta = 4 * np.pi * n * d_mirror / wavelength
246
return 0.5 * (1 + np.cos(delta))
247
248
# Mirror displacement range
249
d_mirror = np.linspace(0, 10e-6, 1000)
250
251
fig, axes = plt.subplots(2, 2, figsize=(10, 8))
252
253
# Plot 1: Fringe pattern for single wavelength
254
I_single = michelson_intensity(d_mirror, wavelength)
255
axes[0, 0].plot(d_mirror*1e6, I_single, 'b-', linewidth=1.5)
256
axes[0, 0].set_xlabel('Mirror displacement ($\\mu$m)')
257
axes[0, 0].set_ylabel('Intensity (normalized)')
258
axes[0, 0].set_title('Michelson Fringes (Single Wavelength)')
259
axes[0, 0].grid(True, alpha=0.3)
260
261
# Plot 2: Coherence length effect (white light)
262
# Simulate short coherence length
263
coherence_lengths = [1e-6, 5e-6, 20e-6]
264
colors_coh = ['red', 'green', 'blue']
265
266
for L_c, color in zip(coherence_lengths, colors_coh):
267
envelope = np.exp(-np.abs(d_mirror) / L_c)
268
I_wl = 0.5 * (1 + envelope * np.cos(4 * np.pi * d_mirror / wavelength))
269
axes[0, 1].plot(d_mirror*1e6, I_wl, color=color, linewidth=1.5,
270
label=f'$L_c = {L_c*1e6:.0f}$ $\\mu$m')
271
272
axes[0, 1].set_xlabel('Mirror displacement ($\\mu$m)')
273
axes[0, 1].set_ylabel('Intensity')
274
axes[0, 1].set_title('Coherence Length Effect')
275
axes[0, 1].legend()
276
axes[0, 1].grid(True, alpha=0.3)
277
278
# Plot 3: Two-wavelength beat pattern
279
lambda3 = 600e-9
280
lambda4 = 650e-9
281
282
I3 = michelson_intensity(d_mirror, lambda3)
283
I4 = michelson_intensity(d_mirror, lambda4)
284
I_beat = I3 + I4
285
286
axes[1, 0].plot(d_mirror*1e6, I_beat, 'purple', linewidth=1)
287
axes[1, 0].set_xlabel('Mirror displacement ($\\mu$m)')
288
axes[1, 0].set_ylabel('Total intensity')
289
axes[1, 0].set_title('Two-Wavelength Beat Pattern')
290
axes[1, 0].grid(True, alpha=0.3)
291
292
# Plot 4: 2D fringe pattern (circular fringes)
293
r = np.linspace(0, 10e-3, 200)
294
theta_circ = np.linspace(0, 2*np.pi, 100)
295
R, THETA = np.meshgrid(r, theta_circ)
296
297
# Path difference varies with r^2 for off-axis rays
298
d_offset = 1e-6 # Small mirror offset
299
f = 0.1 # Focal length of observation lens
300
delta_2d = 4 * np.pi * (d_offset + R**2 / (8 * f**2)) / wavelength
301
302
I_2d_mich = 0.5 * (1 + np.cos(delta_2d))
303
304
X_circ = R * np.cos(THETA)
305
Y_circ = R * np.sin(THETA)
306
307
im = axes[1, 1].pcolormesh(X_circ*1000, Y_circ*1000, I_2d_mich, cmap='gray', shading='auto')
308
axes[1, 1].set_xlabel('$x$ (mm)')
309
axes[1, 1].set_ylabel('$y$ (mm)')
310
axes[1, 1].set_title('Circular Michelson Fringes')
311
axes[1, 1].set_aspect('equal')
312
313
plt.tight_layout()
314
save_plot('michelson.pdf', 'Michelson interferometer: single wavelength, coherence effects, and circular fringes.')
315
\end{pycode}
316
317
\section{Fabry-P\'erot Interferometer}
318
\begin{pycode}
319
# Fabry-Perot interferometer
320
def fabry_perot_transmission(wavelength_range, d, n, R, theta=0):
321
"""Transmission of Fabry-Perot cavity."""
322
delta = 4 * np.pi * n * d * np.cos(theta) / wavelength_range
323
F = 4 * R / (1 - R)**2 # Finesse coefficient
324
T = 1 / (1 + F * np.sin(delta/2)**2)
325
return T
326
327
# Cavity parameters
328
d_fp = 10e-3 # Cavity spacing (m)
329
n_fp = 1.0 # Refractive index (air)
330
331
# Reflectivities
332
reflectivities = [0.7, 0.9, 0.99]
333
colors_R = ['blue', 'green', 'red']
334
335
# Wavelength range around 632.8 nm
336
wavelength_range = np.linspace(632.7e-9, 632.9e-9, 2000)
337
338
fig, axes = plt.subplots(2, 2, figsize=(10, 8))
339
340
# Plot 1: Transmission for different reflectivities
341
for R, color in zip(reflectivities, colors_R):
342
T = fabry_perot_transmission(wavelength_range, d_fp, n_fp, R)
343
axes[0, 0].plot(wavelength_range*1e9, T, color=color, linewidth=1.5, label=f'$R = {R:.2f}$')
344
345
axes[0, 0].set_xlabel('Wavelength (nm)')
346
axes[0, 0].set_ylabel('Transmission')
347
axes[0, 0].set_title('Fabry-P\\'erot Transmission')
348
axes[0, 0].legend()
349
axes[0, 0].grid(True, alpha=0.3)
350
351
# Plot 2: Finesse and free spectral range
352
R_range = np.linspace(0.5, 0.999, 100)
353
finesse = np.pi * np.sqrt(R_range) / (1 - R_range)
354
355
ax2 = axes[0, 1]
356
ax2.semilogy(R_range * 100, finesse, 'b-', linewidth=2)
357
ax2.set_xlabel('Reflectivity (\\%)')
358
ax2.set_ylabel('Finesse $\\mathcal{F}$', color='b')
359
ax2.tick_params(axis='y', labelcolor='b')
360
ax2.grid(True, alpha=0.3)
361
ax2.set_title('Cavity Finesse')
362
363
# Plot 3: Ring pattern
364
r_ring = np.linspace(0, 15e-3, 200)
365
theta_ring = np.linspace(0, 2*np.pi, 100)
366
R_mesh, THETA_mesh = np.meshgrid(r_ring, theta_ring)
367
368
f_lens = 0.1 # Focal length
369
theta_fp = R_mesh / f_lens # Angle at cavity
370
371
R_val = 0.9
372
T_2d = fabry_perot_transmission(wavelength, d_fp, n_fp, R_val, theta_fp)
373
374
X_fp = R_mesh * np.cos(THETA_mesh)
375
Y_fp = R_mesh * np.sin(THETA_mesh)
376
377
im3 = axes[1, 0].pcolormesh(X_fp*1000, Y_fp*1000, T_2d, cmap='hot', shading='auto')
378
axes[1, 0].set_xlabel('$x$ (mm)')
379
axes[1, 0].set_ylabel('$y$ (mm)')
380
axes[1, 0].set_title(f'Fabry-P\\'erot Ring Pattern ($R = {R_val}$)')
381
axes[1, 0].set_aspect('equal')
382
383
# Plot 4: Resolution of two wavelengths
384
lambda_fp1 = 632.80e-9
385
lambda_fp2 = 632.82e-9 # Very close wavelengths
386
wavelength_detail = np.linspace(632.78e-9, 632.84e-9, 1000)
387
388
R_high = 0.98
389
T1 = fabry_perot_transmission(wavelength_detail, d_fp, n_fp, R_high)
390
T2_1 = fabry_perot_transmission(wavelength_detail, d_fp * (lambda_fp2/lambda_fp1), n_fp, R_high)
391
392
axes[1, 1].plot(wavelength_detail*1e9, T1, 'b-', linewidth=1.5, label='$\\lambda_1$')
393
axes[1, 1].plot(wavelength_detail*1e9, T2_1, 'r--', linewidth=1.5, label='$\\lambda_2$')
394
axes[1, 1].set_xlabel('Wavelength (nm)')
395
axes[1, 1].set_ylabel('Transmission')
396
axes[1, 1].set_title('High-Resolution Spectroscopy')
397
axes[1, 1].legend()
398
axes[1, 1].grid(True, alpha=0.3)
399
400
plt.tight_layout()
401
save_plot('fabry_perot.pdf', "Fabry-P\\'erot interferometer: transmission peaks, finesse, ring pattern, and resolution.")
402
403
# Calculate FSR and resolving power
404
FSR = wavelength**2 / (2 * n_fp * d_fp) # Free spectral range
405
finesse_high = np.pi * np.sqrt(0.98) / (1 - 0.98)
406
resolving_power = finesse_high * 2 * d_fp / wavelength
407
\end{pycode}
408
409
\section{Newton's Rings and Thin Film Interference}
410
\begin{pycode}
411
# Newton's rings (air wedge between lens and flat)
412
R_lens = 1.0 # Radius of curvature of lens (m)
413
n_air = 1.0
414
415
# Radius of mth dark ring: r_m = sqrt(m * lambda * R)
416
m_values = np.arange(0, 20)
417
r_dark = np.sqrt(m_values * wavelength * R_lens)
418
r_bright = np.sqrt((m_values + 0.5) * wavelength * R_lens)
419
420
fig, axes = plt.subplots(2, 2, figsize=(10, 8))
421
422
# Plot 1: Dark ring radii
423
axes[0, 0].plot(m_values, r_dark*1000, 'bo-', linewidth=1.5, markersize=4, label='Dark rings')
424
axes[0, 0].plot(m_values, r_bright*1000, 'rs-', linewidth=1.5, markersize=4, label='Bright rings')
425
axes[0, 0].set_xlabel('Ring number $m$')
426
axes[0, 0].set_ylabel('Radius (mm)')
427
axes[0, 0].set_title("Newton's Rings Radii")
428
axes[0, 0].legend()
429
axes[0, 0].grid(True, alpha=0.3)
430
431
# Plot 2: 2D Newton's ring pattern
432
r_newton = np.linspace(0, 5e-3, 300)
433
theta_newton = np.linspace(0, 2*np.pi, 100)
434
R_n, THETA_n = np.meshgrid(r_newton, theta_newton)
435
436
# Air gap thickness
437
t_gap = R_n**2 / (2 * R_lens)
438
439
# Phase difference (reflection from bottom adds pi)
440
delta_newton = 4 * np.pi * n_air * t_gap / wavelength + np.pi
441
I_newton = np.cos(delta_newton/2)**2
442
443
X_n = R_n * np.cos(THETA_n)
444
Y_n = R_n * np.sin(THETA_n)
445
446
im4 = axes[0, 1].pcolormesh(X_n*1000, Y_n*1000, I_newton, cmap='gray', shading='auto')
447
axes[0, 1].set_xlabel('$x$ (mm)')
448
axes[0, 1].set_ylabel('$y$ (mm)')
449
axes[0, 1].set_title("Newton's Rings Pattern")
450
axes[0, 1].set_aspect('equal')
451
452
# Plot 3: Visibility vs number of rings
453
# Visibility decreases due to finite source size
454
source_size = 1e-3 # mm
455
m_vis = np.arange(1, 51)
456
# Simplified visibility model
457
visibility = np.exp(-m_vis * (source_size / (R_lens * 1000))**2)
458
459
axes[1, 0].plot(m_vis, visibility, 'g-', linewidth=2)
460
axes[1, 0].set_xlabel('Ring number $m$')
461
axes[1, 0].set_ylabel('Visibility')
462
axes[1, 0].set_title('Fringe Visibility vs Ring Number')
463
axes[1, 0].grid(True, alpha=0.3)
464
465
# Plot 4: Interferometric surface testing
466
# Simulated surface deviation from flat
467
x_surf = np.linspace(-10, 10, 200)
468
y_surf = np.linspace(-10, 10, 200)
469
X_s, Y_s = np.meshgrid(x_surf, y_surf)
470
471
# Add some surface errors (astigmatism + defects)
472
surface_error = 0.1 * wavelength * (0.3 * X_s**2 - 0.2 * Y_s**2) / 100
473
surface_error += 0.05 * wavelength * np.exp(-((X_s-3)**2 + (Y_s+2)**2) / 4)
474
475
delta_surf = 4 * np.pi * surface_error / wavelength
476
I_surf = np.cos(delta_surf/2)**2
477
478
im5 = axes[1, 1].pcolormesh(X_s, Y_s, I_surf, cmap='gray', shading='auto')
479
axes[1, 1].set_xlabel('$x$ (mm)')
480
axes[1, 1].set_ylabel('$y$ (mm)')
481
axes[1, 1].set_title('Surface Testing Interferogram')
482
axes[1, 1].set_aspect('equal')
483
484
plt.tight_layout()
485
save_plot('newton_rings.pdf', "Newton's rings and interferometric surface testing.")
486
\end{pycode}
487
488
\section{Coherence and Visibility}
489
\begin{pycode}
490
# Temporal and spatial coherence analysis
491
c = 3e8 # Speed of light
492
493
# Temporal coherence
494
def temporal_coherence_function(tau, tau_c):
495
"""Complex degree of temporal coherence."""
496
return np.exp(-np.abs(tau) / tau_c)
497
498
# Spatial coherence (Van Cittert-Zernike)
499
def spatial_coherence_function(d, wavelength, theta_s):
500
"""Complex degree of spatial coherence for circular source."""
501
from scipy.special import j1
502
x = np.pi * d * theta_s / wavelength
503
return np.where(x == 0, 1, 2 * j1(x) / x)
504
505
fig, axes = plt.subplots(2, 2, figsize=(10, 8))
506
507
# Plot 1: Temporal coherence
508
tau = np.linspace(-10e-15, 10e-15, 200)
509
coherence_times = [1e-15, 3e-15, 10e-15]
510
colors_tc = ['blue', 'green', 'red']
511
512
for tau_c, color in zip(coherence_times, colors_tc):
513
gamma_t = temporal_coherence_function(tau, tau_c)
514
axes[0, 0].plot(tau*1e15, gamma_t, color=color, linewidth=2,
515
label=f'$\\tau_c = {tau_c*1e15:.0f}$ fs')
516
517
axes[0, 0].set_xlabel('Time delay $\\tau$ (fs)')
518
axes[0, 0].set_ylabel('$|\\gamma(\\tau)|$')
519
axes[0, 0].set_title('Temporal Coherence Function')
520
axes[0, 0].legend()
521
axes[0, 0].grid(True, alpha=0.3)
522
523
# Plot 2: Coherence length vs linewidth
524
linewidths = np.logspace(-3, 1, 100) # nm
525
coherence_lengths = wavelength**2 / (linewidths * 1e-9) / 1e-6 # um
526
527
axes[0, 1].loglog(linewidths, coherence_lengths, 'b-', linewidth=2)
528
axes[0, 1].set_xlabel('Spectral linewidth (nm)')
529
axes[0, 1].set_ylabel('Coherence length ($\\mu$m)')
530
axes[0, 1].set_title('Coherence Length vs Linewidth')
531
axes[0, 1].grid(True, alpha=0.3, which='both')
532
533
# Plot 3: Spatial coherence
534
d_sep = np.linspace(0, 10e-3, 200)
535
source_angles = [0.001, 0.005, 0.01] # rad
536
colors_sc = ['blue', 'green', 'red']
537
538
from scipy.special import j1
539
540
for theta_s, color in zip(source_angles, colors_sc):
541
gamma_s = np.abs(spatial_coherence_function(d_sep, wavelength, theta_s))
542
axes[1, 0].plot(d_sep*1000, gamma_s, color=color, linewidth=2,
543
label=f'$\\theta_s = {theta_s*1000:.0f}$ mrad')
544
545
axes[1, 0].set_xlabel('Slit separation (mm)')
546
axes[1, 0].set_ylabel('$|\\gamma_{12}|$')
547
axes[1, 0].set_title('Spatial Coherence (Van Cittert-Zernike)')
548
axes[1, 0].legend()
549
axes[1, 0].grid(True, alpha=0.3)
550
551
# Plot 4: Fringe visibility vs path difference
552
path_diff = np.linspace(0, 100e-6, 200)
553
L_c = 30e-6 # Coherence length
554
555
# Visibility = |gamma| for equal intensity beams
556
visibility_plot = np.exp(-path_diff / L_c)
557
558
# Also show fringes with decreasing visibility
559
I_fringes = 0.5 * (1 + visibility_plot * np.cos(2 * np.pi * path_diff / wavelength))
560
561
axes[1, 1].plot(path_diff*1e6, visibility_plot, 'b-', linewidth=2, label='Visibility envelope')
562
axes[1, 1].plot(path_diff*1e6, I_fringes, 'gray', linewidth=0.5, alpha=0.5)
563
axes[1, 1].axvline(x=L_c*1e6, color='red', linestyle='--', alpha=0.7, label=f'$L_c = {L_c*1e6:.0f}$ $\\mu$m')
564
axes[1, 1].set_xlabel('Path difference ($\\mu$m)')
565
axes[1, 1].set_ylabel('Visibility / Intensity')
566
axes[1, 1].set_title('Fringe Visibility vs Path Difference')
567
axes[1, 1].legend()
568
axes[1, 1].grid(True, alpha=0.3)
569
570
plt.tight_layout()
571
save_plot('coherence.pdf', 'Temporal and spatial coherence analysis and fringe visibility.')
572
\end{pycode}
573
574
\section{Results Summary}
575
\begin{pycode}
576
# Generate results table
577
print(r'\begin{table}[htbp]')
578
print(r'\centering')
579
print(r'\caption{Summary of Interference Parameters}')
580
print(r'\begin{tabular}{lll}')
581
print(r'\toprule')
582
print(r'Parameter & Symbol & Value \\')
583
print(r'\midrule')
584
print(r'\multicolumn{3}{c}{\textit{Double-Slit}} \\')
585
print(f'Wavelength & $\\lambda$ & {wavelength*1e9:.1f} nm \\\\')
586
print(f'Slit separation & $d$ & {d*1e3:.1f} mm \\\\')
587
print(f'Slit width & $a$ & {a*1e6:.0f} $\\mu$m \\\\')
588
print(f'Fringe spacing & $\\Delta x$ & {fringe_spacing:.3f} mm \\\\')
589
print(f'Fringes in central max & $N$ & {n_fringes} \\\\')
590
print(r'\midrule')
591
print(r'\multicolumn{3}{c}{\textit{Fabry-P\\'erot}} \\')
592
print(f'Cavity spacing & $d$ & {d_fp*1000:.0f} mm \\\\')
593
print(f'Free spectral range & FSR & {FSR*1e12:.2f} pm \\\\')
594
print(f'Finesse ($R = 0.98$) & $\\mathcal{{F}}$ & {finesse_high:.0f} \\\\')
595
print(f'Resolving power & $R_p$ & {resolving_power/1e6:.1f} $\\times 10^6$ \\\\')
596
print(r'\bottomrule')
597
print(r'\end{tabular}')
598
print(r'\end{table}')
599
\end{pycode}
600
601
\section{Statistical Summary}
602
\begin{itemize}
603
\item \textbf{Wavelength}: $\lambda = $ \py{f"{wavelength*1e9:.1f}"} nm
604
\item \textbf{Slit separation}: $d = $ \py{f"{d*1e3:.1f}"} mm
605
\item \textbf{Slit width}: $a = $ \py{f"{a*1e6:.0f}"} $\mu$m
606
\item \textbf{Screen distance}: $L = $ \py{f"{L:.1f}"} m
607
\item \textbf{Fringe spacing}: \py{f"{fringe_spacing:.3f}"} mm
608
\item \textbf{Fringes in central maximum}: $\approx$ \py{f"{n_fringes}"}
609
\item \textbf{Fabry-P\'erot FSR}: \py{f"{FSR*1e12:.2f}"} pm
610
\item \textbf{Fabry-P\'erot finesse} ($R = 0.98$): \py{f"{finesse_high:.0f}"}
611
\item \textbf{Resolving power}: \py{f"{resolving_power/1e6:.1f}"} $\times 10^6$
612
\end{itemize}
613
614
\section{Conclusion}
615
Interference patterns provide crucial evidence for the wave nature of light and enable high-precision measurements. The double-slit pattern shows interference fringes modulated by a single-slit diffraction envelope. Multiple-slit gratings provide enhanced resolution proportional to the number of slits. Michelson interferometry enables nanometer-scale displacement measurements with applications in gravitational wave detection. Fabry-P\'erot cavities achieve ultra-high spectral resolution with finesse values exceeding 1000, critical for laser spectroscopy and optical communications. Understanding coherence is essential for predicting fringe visibility and designing interferometric systems.
616
617
\end{document}
618
619