Whittaker's History (1910), reviewed › The review's files › sim/whittaker/partB/

partB_ch4.py

In the investigation at sim/whittaker/partB/partB_ch4.py · last changed in commit a281825, 22 November 2026 · 20,038 bytes


"""partB_ch4.py - Whittaker (1910) Chapter IV, "The luminiferous medium, from Bradley to Fresnel": the quantitative claims
tested against modern values.  Part B of the Whittaker review (papers/whittaker_review/Part_B_chapters_IV-V.md).

Every block is one entry W4.n of the review; the printed lines are quoted there.  numpy and scipy only.
Run:  cd /home/doug/aetherscience.org && OMP_NUM_THREADS=1 ~/aspden-review-venv/bin/python3 aspden-investigation/sim/whittaker/partB/partB_ch4.py

Labels: [S] standard physics, [D] derived here, [I] a measured input (at source, or "from memory" where stated),
[M] a modelling choice.  Sources read at source are in sources/whittaker_originals_B/README.md.
"""
import subprocess, numpy as np
from scipy import optimize, special

print("git HEAD:", subprocess.run(["git", "rev-parse", "HEAD"], capture_output=True, text=True, cwd="/home/doug/aetherscience.org").stdout.strip())
ARCSEC = 180 / np.pi * 3600
c = 299792458.0                      # m/s, exact [S]
AU = 149597870700.0                  # m, IAU 2012 exact [S]
def line(tag, text, val=None, unit=""):
    v = "" if val is None else (f"{val:.6g}" if isinstance(val, float) else str(val))
    print(f"  {tag:5s} {text:<92s} {v:>14s} {unit}")

# ---------------------------------------------------------------------------------------------------------------
print("\nW4.1  Bradley's aberration (1728) against the modern constant")
T_sid = 365.256363004 * 86400        # sidereal year, s (from memory) [I]
e_orb = 0.016708                     # Earth's orbital eccentricity, J2000 (from memory) [I]
v_mean = 2 * np.pi * AU / T_sid      # mean orbital speed [D]
kappa = v_mean / c / np.sqrt(1 - e_orb**2) * ARCSEC   # constant of aberration, IAU definition [D]
line("1", "Earth's mean orbital speed 2 pi AU / T_sid", v_mean, "m/s")
line("2", "constant of aberration v/(c sqrt(1-e^2)) in arcsec [D]", kappa, "arcsec")
line("3", "IAU 1976 constant of aberration (from memory)", 20.49552, "arcsec")
bradley = 20.2                       # Bradley 1728: 'ACB ... being 20",2' (at source) [I]
line("4", "Bradley's 20.2 arcsec: deviation from the modern value", (bradley - kappa) / kappa * 100, "%")
line("5", "Bradley's velocity ratio 10210 (at source); modern c/v_mean", c / v_mean)
light_time = AU / c
line("6", "light-time for 1 AU, modern", light_time, "s")
line("7", "Bradley's 8 min 12 s (at source) = 492 s: deviation", (492 - light_time) / light_time * 100, "%")
line("8", "Roemer's ~11 min (Bradley's text): deviation", (660 - light_time) / light_time * 100, "%")
for who, val in [("Struve 1845 20.445", 20.445), ("Struve corrected 20.463", 20.463), ("Nyren 1883 20.492", 20.492), ("favoured in 1903 (Chandler) 20.523", 20.523)]:
    line("9", f"Whittaker's p.100 footnote: {who}: minus the modern value", val - 20.49552, "arcsec")

# ---------------------------------------------------------------------------------------------------------------
print("\nW4.4  Courtivron and Melvill (1752-3): colour-dependent speed of light (p. 104)")
d_jup = 5.2 * AU                     # mean Jupiter-Earth distance ~5.2 AU at opposition... use 5.2 AU as a round figure [M]
t_jup = d_jup / c
line("1", "light-time Jupiter to Earth at 5.2 AU", t_jup / 60, "min")
delta = 30.0 / t_jup                 # 'more than half a minute' colour change before immersion -> speed spread [D]
line("2", "fractional speed spread red/violet implied by a 30 s colour change", delta)
line("3", "GRB 090510 bound on any energy dependence of c (record: survey review sec 2.2, row a) [I, from the record]", 2e-18)
line("4", "the Courtivron-Melvill spread exceeds that bound by a factor", delta / 2e-18)

# ---------------------------------------------------------------------------------------------------------------
print("\nW4.3  Maupertuis' least action against Fermat's least time (pp. 102-103): the sign of the speed in water")
n_w = 1.3330                         # water, 589 nm, 20 C (from memory) [I]
line("1", "corpuscular theory: speed in water / speed in air = n", n_w)
line("2", "wave theory: speed in water / speed in air = 1/n", 1 / n_w)
line("3", "Foucault 1850 found light slower in water (at source: Whittaker p. 136; qualitative) -> the wave theory [S]", "")

# ---------------------------------------------------------------------------------------------------------------
print("\nW4.6  Laplace's corpuscular law for the extraordinary ray (p. 109) is the exact dual of Huygens' spheroid [D]")
n_o, n_e = 1.6584, 1.4864            # calcite at 589 nm (from memory) [I]
v_o, v_e = 1 / n_o, 1 / n_e
th = np.radians(np.array([0, 15, 30, 45, 60, 75, 90]))
inv_r2 = np.cos(th)**2 / v_o**2 + np.sin(th)**2 / v_e**2     # Huygens' spheroid: 1/r^2 at angle th from the axis
V2 = inv_r2                                                  # corpuscular speed^2 ∝ 1/r^2 (Whittaker p. 110)
ratio = (V2 - V2[0]) / np.sin(th[1:])**2 if False else None
k = (V2[1:] - V2[0]) / np.sin(th[1:])**2
line("1", "(V^2 - V_o^2)/sin^2(theta) for theta = 15..90 deg: spread about its mean", (k.max() - k.min()) / k.mean())
line("2", "so the difference of the squared speeds is exactly proportional to sin^2(theta), as Laplace assumed", "")

# ---------------------------------------------------------------------------------------------------------------
print("\nW4.7  Malus (1808) and Brewster (1815): the polarizing angle (pp. 111-113)")
line("1", "Malus's polarizing angle for water, 52 deg 45' (Whittaker p. 112)", 52 + 45 / 60, "deg")
line("2", "Brewster's law arctan(n) with n = 1.3330", np.degrees(np.arctan(n_w)), "deg")
line("3", "difference Malus minus Brewster's law", 52 + 45 / 60 - np.degrees(np.arctan(n_w)), "deg")
line("4", "Brewster 1815 (at source): air, n = 1.00031 -> 45 deg 0' 32\"; his average error over 17 bodies 15'", "")
line("5", "modern air index 1.000277 (from memory) -> Brewster angle minus 45 deg", (np.degrees(np.arctan(1.000277)) - 45) * 3600, "arcsec")

# ---------------------------------------------------------------------------------------------------------------
print("\nW4.8  Fresnel's diffraction (1816-18): the straight edge and Poisson's spot (pp. 114-115) [S]")
# Fresnel integrals: intensity behind a straight edge, plane wave, observation plane at distance b:
# I/I0 = 0.5*[(C(v)+0.5)^2 + (S(v)+0.5)^2], v = x*sqrt(2/(lambda b)); first maximum at v = 1.217 (I/I0 = 1.37)
v = np.linspace(-3, 4, 70001)
S_, C_ = special.fresnel(v)
I = 0.5 * ((C_ + 0.5)**2 + (S_ + 0.5)**2)
imax = np.argmax(I)
line("1", "straight-edge pattern: first bright fringe at v =", v[imax])
line("2", "its intensity relative to the unobstructed light", I[imax])
line("3", "intensity at the geometric edge (v = 0), relative", I[np.argmin(abs(v))])
lam, b = 500e-9, 1.0
line("4", "for lambda = 500 nm, screen 1 m behind the edge: first fringe at x =", v[imax] * np.sqrt(lam * b / 2) * 1e3, "mm")
line("5", "Poisson's spot: on-axis intensity behind a circular disc equals the unobstructed intensity (plane wave) [S]", "")

# ---------------------------------------------------------------------------------------------------------------
print("\nW4.9  Arago's prism test (1810; printed 1853, read at source): the expected emission-theory shift")
beta = 1e-4                          # Earth's orbital speed / c, Arago's '1/10,000'
A_prism = np.radians(24.0)           # Arago's first achromatic prism, net angle about 24 deg (at source)
n_g = 1.5                            # a glass index of order 1.5 [M]
# Newton's refraction: n^2 = 1 + 2U/v^2 for corpuscles arriving with speed v; v -> v(1 +/- beta) changes n by
dn = beta * (n_g**2 - 1) / n_g       # [D]
line("1", "change of index for a 1e-4 change of arrival speed, n = 1.5", dn)
line("2", "thin-prism deviation change A*dn for a 24 deg prism, one sign", A_prism * dn * ARCSEC, "arcsec")
line("3", "Arago (at source): 1/10,186 change of speed -> 6\" on his first prism; morning/evening stars differ by 2e-4 -> 12\" (28\" with the quadruple prism)", "")
line("4", "Arago (at source): the largest discordances found were 5\"; 1/480 of the speed, 1/24 of a second on the aberration", "")
line("5", "modern one-way / first-order tests of the speed of light (Wolf and Petit 1997, GPS, from memory) bound delta c/c at about", 1e-9)
line("6", "so a first-order effect of the size Arago looked for (1e-4) is excluded by about a factor", 1e-4 / 1e-9)

# ---------------------------------------------------------------------------------------------------------------
print("\nW4.10 Fresnel's drag coefficient (1818) against Fizeau (1851), Michelson and Morley (1886), Zeeman (1915)")
f_fresnel = 1 - 1 / n_w**2
line("1", "Fresnel's coefficient 1 - 1/n^2 for water (n = 1.3330)", f_fresnel)
# Fizeau 1851 (Comptes Rendus 33, 349; at source): water 7.069 m/s, 19 observations, single shift 0.23, double 0.46,
# calculated with Fresnel's coefficient 0.40 (Zeeman 1914 recomputes 0.404); full drag 0.92; no drag 0.
L_tube, v_water, lam_white = 1.4875, 7.069, 526e-9     # tube length (1859 paper) and mean white-light wavelength (from memory) [I]
shift_double = 8 * L_tube * v_water * n_w**2 * f_fresnel / (lam_white * c)   # two tubes, double passage, flow reversed [D]
line("2", "Fizeau's set-up: double shift predicted with Fresnel's coefficient (L = 1.4875 m, v = 7.069 m/s, 526 nm)", shift_double, "fringe")
line("3", "the same for full drag (f = 1)", shift_double / f_fresnel, "fringe")
line("4", "Fizeau observed 0.46 (double), against his calculation 0.40 with Fresnel's f and 0.92 with full drag (at source)", "")
line("5", "observed/Fresnel-predicted (Fizeau's own numbers)", 0.46 / 0.40)
line("6", "Fizeau's air test (at source): predicted 0.000465 fringe with Fresnel's f, 0.82 with full drag; observed none", "")
# Michelson and Morley 1886 (Am. J. Sci. 31, 377; at source): x = 0.434 +/- 0.02 against (n^2-1)/n^2 = 0.437
line("7", "Michelson and Morley 1886 (at source): measured 0.434 +/- 0.02; Fresnel 0.437: difference in sigma", (0.437 - 0.434) / 0.02)
# Zeeman 1915 (KNAW Proc. 18, 398; at source): lambda (A), Fresnel, Lorentz, experiment
zee = np.array([[4500, 0.443, 0.464, 0.465], [4580, 0.442, 0.463, 0.463], [5461, 0.439, 0.454, 0.451], [6870, 0.435, 0.447, 0.445]])
# water dispersion: Cauchy fit to standard table values at 20 C (from memory, +/- 0.0002) [I]
lam_tab = np.array([404.7, 435.8, 486.1, 546.1, 589.3, 656.3]) * 1e-3     # micrometres (keeps the fit well conditioned)
n_tab = np.array([1.3428, 1.3403, 1.3372, 1.3345, 1.3330, 1.3311])
X = np.vstack([np.ones_like(lam_tab), lam_tab**-2, lam_tab**-4]).T
coef, *_ = np.linalg.lstsq(X, n_tab, rcond=None)
n_of = lambda l: coef[0] + coef[1] / (l * 1e6)**2 + coef[2] / (l * 1e6)**4           # l in metres
dn_dl = lambda l: (-2 * coef[1] / (l * 1e6)**3 - 4 * coef[2] / (l * 1e6)**5) * 1e6   # per metre
line("8", "water Cauchy fit n = A + B/l^2 + C/l^4 (l in um): max residual", np.abs(n_of(lam_tab * 1e-6) - n_tab).max())
print("        lambda(A)   n(fit)   Fresnel 1-1/n^2   Lorentz +(-l/n dn/dl)   Zeeman's Fresnel   Zeeman's Lorentz   Zeeman measured")
for row in zee:
    l = row[0] * 1e-10
    nn = n_of(l)
    fF = 1 - 1 / nn**2
    fL = fF - (l / nn) * dn_dl(l)
    print(f"        {row[0]:7.0f}   {nn:.4f}   {fF:.4f}            {fL:.4f}                  {row[1]:.3f}              {row[2]:.3f}              {row[3]:.3f}")
chi_F = np.mean(((zee[:, 3] - zee[:, 1]) / 0.004)**2)   # +/- 0.004 taken as a typical probable error of Zeeman's values [M]
chi_L = np.mean(((zee[:, 3] - zee[:, 2]) / 0.004)**2)
line("9", "mean chi^2 of Zeeman's four results against Fresnel's coefficient (sigma 0.004 assumed [M])", chi_F)
line("10", "the same against Lorentz's coefficient with the dispersion term", chi_L)
# relativistic velocity addition: exact result for Fizeau's water speed
u_exact = (c / n_w + v_water) / (1 + v_water / (n_w * c))
f_exact = (u_exact - c / n_w) / v_water
line("11", "relativistic velocity addition at v = 7.069 m/s: effective coefficient", f_exact)
line("12", "its difference from 1 - 1/n^2 (second order in v/c)", f_exact - f_fresnel)
# Hoek 1868 (at source): a null in a water-tube interferometer requires f = 1 - 1/n^2 to first order
line("13", "Hoek 1868 (at source): no shift seen; his eq. (5): phi = eps (1 - 1/n^2); Fresnel's f confirmed", "")

# ---------------------------------------------------------------------------------------------------------------
print("\nW4.13 Fresnel's wave surface (1821-27) and conical refraction (Hamilton 1832, Lloyd 1833; both at source)")
def cones(n1, n2, n3):
    """Fresnel's wave surface for principal indices n1 < n2 < n3: the optic-axis half-angle from the n1 axis, the internal
    ray-cone angle chi, the wave-normal cone angle psi at the ray axis, and the emergent external cone angle phi for a
    face normal to the ray axis (sin phi = n2 tan psi).  Born and Wolf, section 15.3 (from memory), checked numerically below."""
    q = np.sqrt((n2**2 - n1**2) * (n3**2 - n2**2))
    chi = np.arctan(q / (n1 * n3)); psi = np.arctan(q / n2**2); phi = np.arcsin(n2 * np.tan(psi))
    beta = np.arcsin(np.sqrt((1/n2**2 - 1/n3**2) / (1/n1**2 - 1/n3**2)))   # optic axis angle from the n1 (fastest) axis
    return beta, chi, psi, phi
def dms(x):
    d = np.degrees(x); m = (d - int(d)) * 60; s = (m - int(m)) * 60
    return f"{int(d)} deg {int(m)}' {s:.0f}\""
for name, (n1, n2, n3) in [("aragonite, Rudberg's indices used by Lloyd (at source)", (1.5326, 1.6863, 1.6908)),
                           ("aragonite, modern indices at 589 nm (from memory)", (1.5301, 1.6816, 1.6859))]:
    beta, chi, psi, phi = cones(n1, n2, n3)
    print(f"      {name}:")
    line("1", "angle between the optic axes 2*beta", dms(2 * beta))
    line("2", "internal conical refraction: ray-cone angle chi", dms(chi))
    line("3", "external conical refraction: wave-normal cone angle psi inside", dms(psi))
    line("4", "emergent cone angle for a face normal to the ray axis, asin(n2 tan psi)", dms(phi))
line("5", "Hamilton's prediction for Lloyd's crystal (at source)", "2 deg 56' 51\"")
line("6", "Lloyd's measurements (at source): first ~6 deg (double; uncorrected), then 2 deg 44' and 3 deg 14', mean", "2 deg 59'")
# numerical check of the internal cone: rays for wave normals on a tiny circle round the optic axis
n1, n2, n3 = 1.5326, 1.6863, 1.6908
vx, vy, vz = 1 / n1, 1 / n2, 1 / n3
def vel2(s):
    l, m, n = s
    b = -(l**2 * (vy**2 + vz**2) + m**2 * (vx**2 + vz**2) + n**2 * (vx**2 + vy**2))
    cc = l**2 * vy**2 * vz**2 + m**2 * vx**2 * vz**2 + n**2 * vx**2 * vy**2
    disc = max(b * b - 4 * cc, 0.0)
    return np.array([(-b + np.sqrt(disc)) / 2, (-b - np.sqrt(disc)) / 2])   # the two v^2
def ray_dirs(s, h):
    """group velocity d(omega)/dk for omega = |k| v(k-hat): v s-hat + grad_s v (tangential), for both sheets"""
    s = s / np.linalg.norm(s)
    out = []
    for sheet in (0, 1):
        v0 = np.sqrt(vel2(s)[sheet]); g = np.zeros(3)
        for i in range(3):
            e = np.zeros(3); e[i] = h
            sp = (s + e) / np.linalg.norm(s + e); sm = (s - e) / np.linalg.norm(s - e)
            g[i] = (np.sqrt(vel2(sp)[sheet]) - np.sqrt(vel2(sm)[sheet])) / (2 * h)
        r = v0 * s + (g - s * np.dot(g, s))
        out.append(r / np.linalg.norm(r))
    return out
beta = cones(n1, n2, n3)[0]
axis = np.array([np.cos(beta), 0, np.sin(beta)])          # one optic axis, in the x-z plane
u1 = np.array([-np.sin(beta), 0, np.cos(beta)]); u2 = np.array([0, 1, 0])
for eps, h in [(1e-2, 1e-5), (1e-3, 1e-6), (1e-4, 1e-7)]:
    rays = []
    for ph in np.linspace(0, 2 * np.pi, 145):
        s = axis + eps * (np.cos(ph) * u1 + np.sin(ph) * u2)
        rays += ray_dirs(s, h)
    rays = np.array(rays)
    ang = np.arccos(np.clip(rays @ rays.T, -1, 1))
    line("7", f"numerical check, wave normals on a circle of radius {eps:g} rad round the optic axis: largest angle between rays", dms(ang.max()))
inplane = ray_dirs(axis + 1e-4 * u1, 1e-7)
walk = max(np.degrees(np.arccos(np.clip(np.dot(r, axis), -1, 1))) for r in inplane)
line("8", "the in-plane ray's walk-off from the optic axis at 1e-4 rad (the cone's diameter; converges as sqrt(eps))", walk, "deg")
line("9", "formula value chi for the same indices", np.degrees(cones(n1, n2, n3)[1]), "deg")

# ---------------------------------------------------------------------------------------------------------------
print("\nW4.13b Fresnel's construction against the Stokes-Rankine-Rayleigh 'reciprocal' one (Chapter V, p. 172) [D]")
def v_fresnel(s, vs):
    l, m, n = s; vx, vy, vz = vs
    b = -(l**2 * (vy**2 + vz**2) + m**2 * (vx**2 + vz**2) + n**2 * (vx**2 + vy**2))
    cc = l**2 * vy**2 * vz**2 + m**2 * vx**2 * vz**2 + n**2 * vx**2 * vy**2
    disc = max(b * b - 4 * cc, 0.0)
    return np.sqrt(np.array([(-b + np.sqrt(disc)) / 2, (-b - np.sqrt(disc)) / 2]))
def v_recip(s, vs):
    # the same equation with 1/v in place of v: sum s_i^2/(1/v^2 - 1/v_i^2) = 0
    w = v_fresnel(s, tuple(1 / np.array(vs)))
    return 1 / w
for name, ns in [("calcite (1.6584, 1.6584, 1.4864)", (1.6584, 1.6584, 1.4864)), ("aragonite (Rudberg)", (1.5326, 1.6863, 1.6908))]:
    vs = tuple(1 / np.array(ns))
    worst = 0.0
    for t in np.linspace(0, np.pi / 2, 91):
        for p in np.linspace(0, np.pi / 2, 46):
            s = np.array([np.sin(t) * np.cos(p), np.sin(t) * np.sin(p), np.cos(t)])
            nf = np.sort(1 / v_fresnel(s, vs)); nr = np.sort(1 / v_recip(s, vs))
            worst = max(worst, np.abs(nf - nr).max())
    line("1", f"{name}: largest index difference between the two constructions over all directions", worst)
line("2", "Stokes 1872 (Whittaker p. 172): Fresnel's construction right; the difference 100 x the probable error", "")

# ---------------------------------------------------------------------------------------------------------------
print("\nW4.15 Fresnel's sine and tangent laws (1823) [S in Maxwell's theory for mu = mu0]")
def fresnel_rs(i, n):   # amplitude coefficients, light from vacuum into index n
    r = np.arcsin(np.sin(i) / n + 0j)
    return -np.sin(i - r) / np.sin(i + r), np.tan(i - r) / np.tan(i + r)
for name, n in [("water 1.3330", 1.3330), ("BK7 glass 1.5168 (from memory)", 1.5168), ("diamond 2.417 (from memory)", 2.417)]:
    R0 = ((n - 1) / (n + 1))**2
    line("1", f"{name}: normal-incidence reflectance ((n-1)/(n+1))^2", R0 * 100, "%")
    iB = np.arctan(n)
    rs, rp = fresnel_rs(iB, n)
    line("2", f"{name}: Brewster angle", np.degrees(iB), "deg")
    line("3", f"{name}: |r_p|^2 at Brewster's angle (tangent law)", abs(rp)**2)
    line("4", f"{name}: |r_s|^2 at Brewster's angle (sine law)", abs(rs)**2 * 100, "%")
# Fresnel's rhomb: total internal reflection phase difference 45 deg at each of two reflections (n = 1.51)
def tir_phase_diff(th, n):
    # Born and Wolf: tan(delta/2) = cos th sqrt(sin^2 th - 1/n^2)/sin^2 th for the relative phase between p and s
    return 2 * np.arctan(np.cos(th) * np.sqrt(np.sin(th)**2 - 1 / n**2) / np.sin(th)**2)
n_rh = 1.51
ths = np.linspace(np.arcsin(1 / n_rh) + 1e-6, np.pi / 2 - 1e-6, 20001)
d = np.degrees(tir_phase_diff(ths, n_rh))
line("5", "Fresnel's rhomb (n = 1.51): largest p-s phase difference per total reflection", d.max(), "deg")
roots = ths[np.where(np.diff(np.sign(d - 45)))[0]]
line("6", "angles giving 45 deg per reflection (two reflections make a quarter wave)", ", ".join(f"{np.degrees(x):.2f}" for x in roots), "deg")
line("7", "Fresnel's quarter-wave rhomb angle, textbook value 54.6 deg (from memory)", 54.6, "deg")

# ---------------------------------------------------------------------------------------------------------------
print("\nW4.5  Young's half-wave loss (1801) in Fresnel's coefficients [S]")
line("1", "r_s at normal incidence, air to glass (n = 1.5): (1-n)/(1+n)", (1 - 1.5) / (1 + 1.5))
line("2", "a negative sign is a phase change of pi: the centre of Newton's rings is dark, as Young found", "")
line("3", "Young's sassafras test: oil index about 1.53 between crown (1.52) and flint (1.62) (from memory): no sign change -> bright centre", "")
print("\nDone.")