diffraction
Fraunhofer (far-field) diffraction at normal incidence by a single slit, a double slit, an N-slit grating and a circular aperture: intensity against angle, dark fringes and maxima, missing orders, resolving power mN and the Rayleigh limit, with the pattern as csv.
Scalar theory; Bessel functions and every root computed, nothing tabled.
- Field
- Waves, optics and circuits
- Version
- 0.1.0
- Runs as
- Compiled (Rust)
- Typical run
- 0.1 s
Compiled from source: run sh packs/install.sh once before admitting it.
Known answers it must pass
r0001single slit, closed form (Hecht 10.2.1): zeros at sin t = m λ/a (500 nm, 10 µm: asin 0.05, asin 0.1); first side maximum at tan b = b, b = 4.4934094579 = 1.4302966531 π (A&S Table 4.19), height 1/(1+b²) = 4.719 %; FWHM 2(1.3915573783)/π = 0.8858929 λ/a (root of sin x/x = 1/√2); 10⁻⁹ rel on the asin values, 10⁻⁸ on the tabled rootspassed
first_zero_deg2.86598 ± 2.9 × 10⁻⁹2.86598lockedunder 0.01 % of the tolerance usedzeros_deg.1= 5.73917, within 1.000000 × 10⁻⁹ relativereading not recorded on this pagefirst_zero_mm50.0626 ± 5 × 10⁻⁸50.0626lockedunder 0.01 % of the tolerance usedfirst_side_max_beta_over_pi1.4303 ± 1.4 × 10⁻⁸1.4303locked0.17 % of the tolerance usedfirst_side_max_rel0.0471904 ± 4.7 × 10⁻¹⁰0.0471904lockedunder 0.01 % of the tolerance usedcentral_fwhm_lambda_over_width0.885893 ± 8.9 × 10⁻⁹0.885893locked4.3 % of the tolerance usedr0002circular aperture, Airy pattern (Born & Wolf 8.5.2): first dark ring at j11/π = 3.8317059702/π = 1.2196698913 λ/D, first bright ring at j21/π = 5.1356223018/π = 1.6347193504 λ/D (A&S Table 9.5), its height (2 J₁(x)/x)² with J₁(j21) = J₂'(j21) = -0.3396687428 (A&S Table 9.5) = 1.7498 % (10⁻⁸), light inside the first dark ring 1 - J₀(j11)² = 83.78 % (Rayleigh, J₀(j11) = -0.4027593957); 100 mm telescope at 550 nm: Rayleigh limit asin(1.2196698913 × 5.5 × 10⁻⁶) = 6.7081844 urad, so 7 urad is resolvedpassed
first_zero_lambda_over_D1.21967 ± 1.2 × 10⁻⁹1.21967lockedunder 0.01 % of the tolerance usedfirst_ring_lambda_over_D1.63472 ± 1.6 × 10⁻⁹1.63472lockedunder 0.01 % of the tolerance usedfirst_ring_peak_rel0.0174979 ± 1.7 × 10⁻¹⁰0.0174979locked8.1 % of the tolerance usedairy_disc_energy_fraction0.837785 ± 8.4 × 10⁻⁹0.837785locked2.1 % of the tolerance usedrayleigh_limit_urad6.70818 ± 6.7 × 10⁻⁹6.70818locked0.24 % of the tolerance usedresolved= truetruelockedexact matchr0003grating equation d sin t = m λ (Hecht 10.2.8): 600 nm, d = 2 µm, order 2: sin t = 0.6, t = 36.869897646°; resolving power mN = 2 × 1000 = 2000; order height (sin b/b)² at b = π a m/d = π/2 (a = 0.5 µm) = 4/π² = 0.405284735; dispersion m/(d cos t) = 1.25 × 10⁻³ rad/nm = 0.0716197244°/nm; highest order floor(d/λ) = 3; all 10⁻⁹ relpassed
order_angle_deg36.8699 ± 3.7 × 10⁻⁸36.8699lockedunder 0.01 % of the tolerance usedresolving_power2000 ± 2 × 10⁻⁹2000lockedunder 0.01 % of the tolerance usedorder_peak_rel0.405285 ± 4.1 × 10⁻¹⁰0.405285lockedunder 0.01 % of the tolerance useddispersion_deg_per_nm0.0716197 ± 7.2 × 10⁻¹¹0.0716197lockedunder 0.01 % of the tolerance usedmin_resolvable_nm0.3 ± 3 × 10⁻¹⁰0.3lockedunder 0.01 % of the tolerance usedmax_order33lockedr0004Young double slit (Hecht 9.3): He-Ne 632.8 nm, d = 100 µm, a = 20 µm, L = 2 m: fringe spacing λ L/d = 12.656 mm; d/a = 5 so order 5 is missing and 2(5)-1 = 9 fringes sit in the central envelope; order 1 height (sin(π/5)/(π/5))² = 0.8751402001; peak gain N² = 4; 10⁻⁹ relpassed
fringe_spacing_mm12.656 ± 1.3 × 10⁻⁸12.656lockedunder 0.01 % of the tolerance usedmissing_orders.0= 5, exactlyreading not recorded on this pagefringes_in_central_peak99lockedorder_peak_rel0.87514 ± 8.8 × 10⁻¹⁰0.87514lockedunder 0.01 % of the tolerance usedpeak_gain_over_single_slit44lockedr0005grating resolves the sodium D doublet (Hecht 10.2.8): λ/delta_lambda = 589.0/0.6 = 981.667 needed; 1000 lines in first order give mN = 1000, so resolved, and the fewest lines that do it is ceil(981.667) = 982; exact arithmetic, 10⁻⁹ relpassed
required_resolving_power981.667 ± 9.8 × 10⁻⁷981.667lockedunder 0.01 % of the tolerance usedresolving_power1000 ± 10⁻⁹1000lockedunder 0.01 % of the tolerance usedmin_slits_to_resolve982982lockedresolved= truetruelockedexact match
Each line is one reading the kernel checked. The bright band is the tolerance; the needle is the value the instrument actually returned when it was admitted. A needle near the centre line used little of its tolerance.
Inputs
| Name | Unit | Default | Meaning |
|---|---|---|---|
aperture | single_slit | single_slit (uses slit_width_um), double_slit and grating (slit_width_um, slit_spacing_um, slits, order), circular (diameter_mm). | |
wavelength_nm | nm | 632.8 | Wavelength in the medium around the aperture. |
slit_width_um | µm | 50 | Width a of each slit. |
slit_spacing_um | µm | 250 | Centre-to-centre spacing d of the slits (grating period); at least slit_width_um. |
slits | 1 | 2 | Number of slits N lit by the beam (2 for double_slit). |
order | 1 | 1 | Diffraction order m to report (angle, peak height, resolving power mN, dispersion). |
diameter_mm | mm | 1 | Diameter D of the circular aperture (lens, mirror, pinhole). |
screen_distance_m | m | 1 | Distance L to the screen, or the focal length of the lens that focuses the pattern (then set focused = true). |
focused | false | true: the pattern is formed in the focal plane of a lens of focal length screen_distance_m, so no far-field warning. | |
points | 1 | 2001 | Evenly spaced angles in pattern.csv (narrow grating orders get extra samples). |
angle_max_deg | deg | Largest angle from the axis in pattern.csv (optional; by default about three side lobes, or past the order asked for). | |
query_angle_deg | deg | Optional: an angle at which to report the relative intensity. | |
separation_urad | µrad | Optional, single_slit or circular: angular separation of two point sources, judged against the Rayleigh limit. | |
delta_wavelength_nm | nm | Optional, double_slit or grating: wavelength gap of two lines, judged against the resolving power mN. |
Readings
| Name | Unit | Meaning |
|---|---|---|
aperture | single_slit, double_slit, grating or circular | |
first_zero_deg | deg | First dark fringe (slit, N slits) or dark ring (circle) from the axis. |
first_zero_mm | mm | Its distance from the axis on the screen, L tan t. |
central_peak_width_mm | mm | |
zeros_deg | deg | |
first_side_max_beta_over_pi | 1 | Single slit: root of tan b = b over π. |
first_side_max_rel | 1 | Single slit: first side maximum over the central peak, 1/(1 + b²). |
first_side_max_deg | deg | |
central_fwhm_lambda_over_width | 1 | Full width at half maximum of the central peak in λ/a (slit) or λ/D (circle). |
central_fwhm_deg | deg | |
rayleigh_limit_deg | deg | |
rayleigh_limit_urad | µrad | Angle of the first zero: sin t = λ/a (slit), 1.21967 λ/D (circle). |
first_zero_lambda_over_D | 1 | Circle: j_{1,1}/π. |
first_ring_lambda_over_D | 1 | Circle: first bright ring at j_{2,1}/π. |
first_ring_peak_rel | 1 | Circle: first bright ring over the central peak. |
airy_disc_energy_fraction | 1 | Circle: share of the light inside the first dark ring, 1 - J₀² - J₁² (Rayleigh). |
dark_rings | ||
slits | 1 | |
order | 1 | |
max_order | 1 | Highest order that exists, floor(d/λ). |
peak_gain_over_single_slit | 1 | N². |
secondary_maxima_between_orders | 1 | N - 2. |
fringe_spacing_mm | mm | Paraxial spacing of the principal maxima on the screen, λ L / d. |
missing_orders | 1 | Orders that fall on a zero of the slit envelope (m a / d whole). |
fringes_in_central_peak | 1 | |
envelope_first_zero_deg | deg | |
order_angle_deg | deg | d sin t = m λ. |
order_position_mm | mm | |
order_missing | true when order m falls on a zero of the slit envelope | |
order_peak_rel | 1 | Height of order m over the central peak, (sin b / b)² at b = π a m / d. |
order_halfwidth_deg | deg | From order m to the dark fringe beside it. |
resolving_power | 1 | m N. |
min_resolvable_nm | nm | λ / (m N). |
free_spectral_range_nm | nm | λ / m. |
dispersion_deg_per_nm | deg/nm | m / (d cos t). |
required_resolving_power | 1 | λ / delta_lambda. |
min_slits_to_resolve | 1 | |
resolved | Rayleigh criterion met (set when separation_urad or delta_wavelength_nm is given). | |
resolution_margin | 1 | Separation over the Rayleigh limit, or mN over λ/delta_lambda. |
fresnel_number | 1 | (W/2)² / (λ L) for the whole aperture; Fraunhofer needs it well below 1. |
far_field_distance_m | m | 2 W² / λ. |
intensity_at_query_rel | 1 | |
maxima | ||
angle_max_deg | deg | |
pattern_points | 1 | |
warnings | list of plain-language warnings |
Try the call
Change a value and the command updates. Nothing runs here; paste it into your terminal or give it to your agent.