Model
A plane wave of vacuum wavelength λ falls at angle θᵢ on N slits of width a with centres d apart.
In the far field (or the focal plane of a lens) every slit adds a phasor. The phase step between
neighbouring slits is 2β, and the phase across one slit spans 2α:
Sign convention. All angles are directions of travel measured from the grating normal, positive counter-clockwise, on the transmitted side. The zero order is the undeviated beam θ₀ = θᵢ, and a positive order is deviated towards larger θ.
- N
- number of coherently illuminated slits (beam width / d)
- d, 1/d
- grating pitch; groove density in lines/mm
- a
- transparent width of one slit (a ≤ d)
- θᵢ, θm
- incidence angle and angle of order m
- m
- diffraction order (integer)
- w, w′
- entrance slit width and its image on the detector, w′ = w (fcam/fcol) cos θᵢ / cos θm
- p
- detector pixel pitch
- dx/dλ
- linear dispersion fcam m/(d cos θm); its inverse is quoted in nm/mm
Assumptions and validity: scalar Fraunhofer diffraction with no obliquity factor and no polarization dependence; a perfectly periodic, infinitely thin amplitude grating in air; uniform, fully coherent illumination of N slits; incoherent sum over spectral lines. The spectrometer treats the entrance slit as an incoherent line source whose image adds a rectangle of width w′ (linearised about the camera axis), with ideal aberration-free lenses and a detector of 2048 square pixels with 100 % fill factor. The white-light continuum uses the order-integrated result, valid when the spectrum is smooth over λ/(mN) (the tool warns for N < 10).
Derivation: array factor, resolving power and instrument profile
Array factor. The slits sit at xn = nd. A far-field direction θ adds the phase k d(sin θ − sin θᵢ) = 2β per slit, so the field is a geometric series: Σn=0N−1 e2iβn = ei(N−1)β sin(Nβ)/sin β. Dividing by N normalises it to 1 at β = 0. Integrating across one slit multiplies by sin α/α.
Removable singularity. At every principal maximum β = mπ both sines vanish. Writing β = mπ + ε gives sin(Nβ)/(N sin β) = (−1)m(N−1) sin(Nε)/(N sin ε) → (−1)m(N−1). The code reduces β to ε first and uses 1 − (N² − 1)ε²/6 + … when |Nε| < 10⁻⁴, so the peaks are exactly 1 times the envelope.
Missing orders. The envelope vanishes at α = kπ. At order m, α/β = a/d, so α = πma/d, which is a multiple of π when m = k·d/a. Those orders are missing even though the grating equation allows them.
Resolving power. The first zero next to a principal maximum sits at Nε = π, a shift of Δ(sin θ) = λ/(Nd). A second line of wavelength λ + Δλ has its order-m peak shifted by mΔλ/d. Rayleigh's criterion puts the second peak on the first zero, so mΔλ/d = λ/(Nd), which gives λ/Δλ = mN. For equal lines the sum dips to 8/π² ≈ 81 % between the peaks; the tool uses that dip as its "resolved" test.
Dispersion and FSR. Differentiating d(sin θ − sin θᵢ) = mλ at fixed θᵢ gives d cos θ dθ = m dλ. The same angle carries λ in order m + 1 and λ + λ/m in order m, so a band wider than λ/m overlaps the next order.
Instrument profile. Each point of the entrance slit is an independent source at a slightly different θᵢ. Its spectrum is the same grating response shifted on the detector, so the recorded profile is the grating response convolved with the slit image (width w′), then integrated over each pixel (a second rectangle of width p) and sampled at the pixel centres. The widths add roughly in quadrature for similar sizes and the largest one wins otherwise. Only the first factor scales with N.
Worked example: a teaching spectrometer on the sodium doublet
A 600 lines/mm grating is illuminated over 2.0 mm at normal incidence. Collimator and camera both have f = 500 mm,
the entrance slit is 20 µm and the pixels are 5 µm. Is the Na doublet (588.995/589.592 nm) resolved? Set N = 1200 and the
values above (start from Na D, N = 2000) to check each step.
- d = 1/600 mm = 1.667 µm and N = 2.0 mm/d = 1200. First order: sin θ₁ = 589.3 nm/1.667 µm = 0.3536, θ₁ = 20.71°.
- Angular dispersion dθ/dλ = 1/(d cos θ₁) = 0.641 mrad/nm, so the lines are 0.383 mrad apart. Linear dispersion f dθ/dλ = 0.321 mm/nm (3.12 nm/mm): 192 µm on the detector.
- Ideal resolving power mN = 1200 > 987 needed, Rayleigh limit 0.491 nm. The grating-only FWHM is 0.886 λ/(mN) = 0.435 nm.
- Slit image w′ = 20 µm × (500/500) × cos 0°/cos 20.71° = 21.4 µm → 0.067 nm. One pixel = 5 µm → 0.016 nm. Both are well below 0.435 nm: this instrument is diffraction (grating) limited, with a measured FWHM of 0.437 nm, λ/FWHM ≈ 1350.
- The model gives a dip to 60 % of the weaker (D1) peak for the ideal grating and about 62 % on the pixels: resolved. Widening the slit to 200 µm makes w′ ≈ 0.67 nm and the dip disappears, although mN is unchanged.