S13 · Lesson 50 · Optics lab
Carrying a Gaussian beam's q parameter through lenses and free space in Python, solving a slab waveguide's mode equations by bisection, and propagating a sampled field with the FFT using free space's transfer function, each checked against the closed forms of the earlier lessons
Three of the course's core calculations become a few lines of NumPy each: the ABCD law for Gaussian beams (lesson 3), the transcendental equations for a slab's modes (lesson 16), and free space as a filter on spatial frequencies (lesson 4). Each is checked against numbers derived by hand. The last one hides a trap that has bitten many simulation codes: a square root with the wrong sign makes evanescent waves grow without limit.
Predict
Your angular-spectrum code multiplies each spatial frequency by with . For ν above 1/λ, NumPy's complex square root returns a positive imaginary part. What happens to those components?
With , , which grows. Physically the evanescent field must decay away from its source, so must be . The lab's test sends a 0.5 µm grating (finer than 633 nm light can carry) 2 µm forward; with the wrong branch its power grows by 10²³.
Name it
Task 1: the q parameter
Start from at a waist and apply for each element; recover and .
Task 2: slab modes
With , mode m has in ; even modes solve and odd ones . On each interval the difference is monotonic, so bisection finds every root.
Task 3: angular spectrum
FFT the sampled field, multiply by with the decaying branch of , inverse FFT. Measure the width by the second moment of intensity: for a Gaussian , .
Worked example
What should task 1 give for a 1 mm, 1550 nm waist focused by a 50 mm lens, and for a 50/100 mm telescope?
Show the solution
- The focused beam. Scanning distance after the lens, the smallest width is 24.66 µm at 49.97 mm, lesson 3's numbers.
- The telescope. With a 50 mm lens, 150 mm of space and a 100 mm lens, the beam leaves 2.000 mm wide and almost collimated.
- A free-space check. Starting from the waist, of free space gives exactly
Answer the smallest width after the 50 mm lens is 24.66 µm at 49.97 mm, and the 50/100 mm telescope sends the beam out 2.000 mm wide and almost collimated.
Worked example
What should task 2 find for lesson 16's slab and a silicon slab?
Show the solution
- Lesson 16's slab. The 10 µm, 1.48/1.46 slab at 1550 nm carries four TE modes, with effective indices
- Thinned to 3 µm. It's single-mode, at 1.472453.
- A silicon slab. A 0.4 µm silicon slab (3.5 in 1.45) has V = 2.58 and two modes, despite being so thin, because its index contrast is so high.
Answer lesson 16's slab gives four TE modes (1.478604, 1.474485, 1.467940 and 1.460440), one mode at 1.472453 when thinned to 3 µm, and the silicon slab gives two modes.
Check
Step 1. Write propagate_q and beam: Gaussian beams through ABCD systems.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
Step 2. Write slab_te_modes: every TE mode by bisection.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
Step 3. Write angular_spectrum: free space as a filter, by FFT.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Explain why
Why does the angular-spectrum method reproduce Gaussian beam spreading so exactly?
The method is exact for the scalar wave equation: it decomposes the field into plane waves, which free space doesn't change except by a phase, and recombines them. Nothing in it assumes a Gaussian shape or a paraxial angle. The Gaussian beam formulas of lesson 2 are the paraxial solution, valid when the beam's angles are small, which for a 50 µm waist at 633 nm (a 4 mrad divergence) they are, so the two agree to a few parts per million. The remaining differences come from the sampling, the finite window and the tiny nonparaxial terms the exact method keeps and the approximate formula drops.
Practice
Keep practicing
3 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.