Invntr
Source

All instruments

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

Admission replaydiffraction 0.1.0 · files f6137c3f76a0…45bc
  1. 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 used
    zeros_deg.1{"value": 5.739170477266787, "rel_tol": 1e-09}
    first_zero_mm50.0626 ± 5e-0850.0626lockedunder 0.01 % of the tolerance used
    first_side_max_beta_over_pi1.4303 ± 1.4e-081.4303locked0.17 % of the tolerance used
    first_side_max_rel0.0471904 ± 4.7e-100.0471904lockedunder 0.01 % of the tolerance used
    central_fwhm_lambda_over_width0.885893 ± 8.9e-090.885893locked4.3 % of the tolerance used
  2. r0002circular 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 used
    first_ring_lambda_over_D1.63472 ± 1.6e-091.63472lockedunder 0.01 % of the tolerance used
    first_ring_peak_rel0.0174979 ± 1.7e-100.0174979locked8.1 % of the tolerance used
    airy_disc_energy_fraction0.837785 ± 8.4e-090.837785locked2.1 % of the tolerance used
    rayleigh_limit_urad6.70818 ± 6.7e-096.70818locked0.24 % of the tolerance used
    resolved= truetruelockedexact match
  3. r0003grating 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 used
    resolving_power2000 ± 2e-092000lockedunder 0.01 % of the tolerance used
    order_peak_rel0.405285 ± 4.1e-100.405285lockedunder 0.01 % of the tolerance used
    dispersion_deg_per_nm0.0716197 ± 7.2e-110.0716197lockedunder 0.01 % of the tolerance used
    min_resolvable_nm0.3 ± 3e-100.3lockedunder 0.01 % of the tolerance used
    max_order33locked
  4. r0004Young 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 used
    missing_orders.0{"value": 5, "abs_tol": 0}
    fringes_in_central_peak99locked
    order_peak_rel0.87514 ± 8.8e-100.87514lockedunder 0.01 % of the tolerance used
    peak_gain_over_single_slit44locked
  5. r0005grating 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 used
    resolving_power1000 ± 1e-091000lockedunder 0.01 % of the tolerance used
    min_slits_to_resolve982982locked
    resolved= truetruelockedexact match
5 of 5 cases passed · sandbox macos-seatbeltrecorded from the kernel in a fresh lab

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

NameUnitDefaultMeaning
aperturesingle_slitsingle_slit (uses slit_width_um), double_slit and grating (slit_width_um, slit_spacing_um, slits, order), circular (diameter_mm).
wavelength_nmnm632.8Wavelength in the medium around the aperture.
slit_width_umµm50Width a of each slit.
slit_spacing_umµm250Centre-to-centre spacing d of the slits (grating period); at least slit_width_um.
slits12Number of slits N lit by the beam (2 for double_slit).
order11Diffraction order m to report (angle, peak height, resolving power mN, dispersion).
diameter_mmmm1Diameter D of the circular aperture (lens, mirror, pinhole).
screen_distance_mm1Distance L to the screen, or the focal length of the lens that focuses the pattern (then set focused = true).
focusedfalsetrue: the pattern is formed in the focal plane of a lens of focal length screen_distance_m, so no far-field warning.
points12001Evenly spaced angles in pattern.csv (narrow grating orders get extra samples).
angle_max_degdegLargest angle from the axis in pattern.csv (optional; by default about three side lobes, or past the order asked for).
query_angle_degdegOptional: an angle at which to report the relative intensity.
separation_uradµradOptional, single_slit or circular: angular separation of two point sources, judged against the Rayleigh limit.
delta_wavelength_nmnmOptional, double_slit or grating: wavelength gap of two lines, judged against the resolving power mN.

Readings

NameUnitMeaning
aperturesingle_slit, double_slit, grating or circular
first_zero_degdegFirst dark fringe (slit, N slits) or dark ring (circle) from the axis.
first_zero_mmmmIts distance from the axis on the screen, L tan t.
central_peak_width_mmmm
zeros_degdeg
first_side_max_beta_over_pi1Single slit: root of tan b = b over pi.
first_side_max_rel1Single slit: first side maximum over the central peak, 1/(1 + b^2).
first_side_max_degdeg
central_fwhm_lambda_over_width1Full width at half maximum of the central peak in lambda/a (slit) or lambda/D (circle).
central_fwhm_degdeg
rayleigh_limit_degdeg
rayleigh_limit_uradµradAngle of the first zero: sin t = lambda/a (slit), 1.21967 lambda/D (circle).
first_zero_lambda_over_D1Circle: j_{1,1}/pi.
first_ring_lambda_over_D1Circle: first bright ring at j_{2,1}/pi.
first_ring_peak_rel1Circle: first bright ring over the central peak.
airy_disc_energy_fraction1Circle: share of the light inside the first dark ring, 1 - J0^2 - J1^2 (Rayleigh).
dark_rings
slits1
order1
max_order1Highest order that exists, floor(d/lambda).
peak_gain_over_single_slit1N^2.
secondary_maxima_between_orders1N - 2.
fringe_spacing_mmmmParaxial spacing of the principal maxima on the screen, lambda L / d.
missing_orders1Orders that fall on a zero of the slit envelope (m a / d whole).
fringes_in_central_peak1
envelope_first_zero_degdeg
order_angle_degdegd sin t = m lambda.
order_position_mmmm
order_missingtrue when order m falls on a zero of the slit envelope
order_peak_rel1Height of order m over the central peak, (sin b / b)^2 at b = pi a m / d.
order_halfwidth_degdegFrom order m to the dark fringe beside it.
resolving_power1m N.
min_resolvable_nmnmlambda / (m N).
free_spectral_range_nmnmlambda / m.
dispersion_deg_per_nmdeg/nmm / (d cos t).
required_resolving_power1lambda / delta_lambda.
min_slits_to_resolve1
resolvedRayleigh criterion met (set when separation_urad or delta_wavelength_nm is given).
resolution_margin1Separation over the Rayleigh limit, or mN over lambda/delta_lambda.
fresnel_number1(W/2)^2 / (lambda L) for the whole aperture; Fraunhofer needs it well below 1.
far_field_distance_mm2 W^2 / lambda.
intensity_at_query_rel1
maxima
angle_max_degdeg
pattern_points1
warningslist 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.

Terminal
MCP call