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 lambda/a (500 nm, 10 um: asin 0.05, asin 0.1); first side maximum at tan b = b, b = 4.4934094579 = 1.4302966531 pi (A&S Table 4.19), height 1/(1+b^2) = 4.719 %; FWHM 2(1.3915573783)/pi = 0.8858929 lambda/a (root of sin x/x = 1/sqrt 2); 1e-9 rel on the asin values, 1e-8 on the tabled rootspassed
first_zero_deg2.86598 ± 2.9e-092.86598lockedunder 0.01 % of the tolerance usedzeros_deg.1{"value": 5.739170477266787, "rel_tol": 1e-09}first_zero_mm50.0626 ± 5e-0850.0626lockedunder 0.01 % of the tolerance usedfirst_side_max_beta_over_pi1.4303 ± 1.4e-081.4303locked0.17 % of the tolerance usedfirst_side_max_rel0.0471904 ± 4.7e-100.0471904lockedunder 0.01 % of the tolerance usedcentral_fwhm_lambda_over_width0.885893 ± 8.9e-090.885893locked4.3 % of the tolerance usedr0002circular aperture, Airy pattern (Born & Wolf 8.5.2): first dark ring at j11/pi = 3.8317059702/pi = 1.2196698913 lambda/D, first bright ring at j21/pi = 5.1356223018/pi = 1.6347193504 lambda/D (A&S Table 9.5), its height (2 J1(x)/x)^2 with J1(j21) = J2'(j21) = -0.3396687428 (A&S Table 9.5) = 1.7498 % (1e-8), light inside the first dark ring 1 - J0(j11)^2 = 83.78 % (Rayleigh, J0(j11) = -0.4027593957); 100 mm telescope at 550 nm: Rayleigh limit asin(1.2196698913 x 5.5e-6) = 6.7081844 urad, so 7 urad is resolvedpassed
first_zero_lambda_over_D1.21967 ± 1.2e-091.21967lockedunder 0.01 % of the tolerance usedfirst_ring_lambda_over_D1.63472 ± 1.6e-091.63472lockedunder 0.01 % of the tolerance usedfirst_ring_peak_rel0.0174979 ± 1.7e-100.0174979locked8.1 % of the tolerance usedairy_disc_energy_fraction0.837785 ± 8.4e-090.837785locked2.1 % of the tolerance usedrayleigh_limit_urad6.70818 ± 6.7e-096.70818locked0.24 % of the tolerance usedresolved= truetruelockedexact matchr0003grating equation d sin t = m lambda (Hecht 10.2.8): 600 nm, d = 2 um, order 2: sin t = 0.6, t = 36.869897646 deg; resolving power mN = 2 x 1000 = 2000; order height (sin b/b)^2 at b = pi a m/d = pi/2 (a = 0.5 um) = 4/pi^2 = 0.405284735; dispersion m/(d cos t) = 1.25e-3 rad/nm = 0.0716197244 deg/nm; highest order floor(d/lambda) = 3; all 1e-9 relpassed
order_angle_deg36.8699 ± 3.7e-0836.8699lockedunder 0.01 % of the tolerance usedresolving_power2000 ± 2e-092000lockedunder 0.01 % of the tolerance usedorder_peak_rel0.405285 ± 4.1e-100.405285lockedunder 0.01 % of the tolerance useddispersion_deg_per_nm0.0716197 ± 7.2e-110.0716197lockedunder 0.01 % of the tolerance usedmin_resolvable_nm0.3 ± 3e-100.3lockedunder 0.01 % of the tolerance usedmax_order33lockedr0004Young double slit (Hecht 9.3): He-Ne 632.8 nm, d = 100 um, a = 20 um, L = 2 m: fringe spacing lambda 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(pi/5)/(pi/5))^2 = 0.8751402001; peak gain N^2 = 4; 1e-9 relpassed
fringe_spacing_mm12.656 ± 1.3e-0812.656lockedunder 0.01 % of the tolerance usedmissing_orders.0{"value": 5, "abs_tol": 0}fringes_in_central_peak99lockedorder_peak_rel0.87514 ± 8.8e-100.87514lockedunder 0.01 % of the tolerance usedpeak_gain_over_single_slit44lockedr0005grating resolves the sodium D doublet (Hecht 10.2.8): lambda/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, 1e-9 relpassed
required_resolving_power981.667 ± 9.8e-07981.667lockedunder 0.01 % of the tolerance usedresolving_power1000 ± 1e-091000lockedunder 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 pi. |
first_side_max_rel | 1 | Single slit: first side maximum over the central peak, 1/(1 + b^2). |
first_side_max_deg | deg | |
central_fwhm_lambda_over_width | 1 | Full width at half maximum of the central peak in lambda/a (slit) or lambda/D (circle). |
central_fwhm_deg | deg | |
rayleigh_limit_deg | deg | |
rayleigh_limit_urad | µrad | Angle of the first zero: sin t = lambda/a (slit), 1.21967 lambda/D (circle). |
first_zero_lambda_over_D | 1 | Circle: j_{1,1}/pi. |
first_ring_lambda_over_D | 1 | Circle: first bright ring at j_{2,1}/pi. |
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 - J0^2 - J1^2 (Rayleigh). |
dark_rings | ||
slits | 1 | |
order | 1 | |
max_order | 1 | Highest order that exists, floor(d/lambda). |
peak_gain_over_single_slit | 1 | N^2. |
secondary_maxima_between_orders | 1 | N - 2. |
fringe_spacing_mm | mm | Paraxial spacing of the principal maxima on the screen, lambda 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 lambda. |
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)^2 at b = pi 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 | lambda / (m N). |
free_spectral_range_nm | nm | lambda / m. |
dispersion_deg_per_nm | deg/nm | m / (d cos t). |
required_resolving_power | 1 | lambda / 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 lambda/delta_lambda. |
fresnel_number | 1 | (W/2)^2 / (lambda L) for the whole aperture; Fraunhofer needs it well below 1. |
far_field_distance_m | m | 2 W^2 / lambda. |
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.