Does light charge the quons? › Files cited on the page › check_trial23_fable/
report_numbers.py
"""report_numbers.py (29th reviewer, task T1, post hoc, own code)
The few numbers of REPORT.md that the earlier scripts in this folder did not print.
Nothing here is imported from the trial's scripts. Lattice coefficients are copied from
dipole_lattice_bravais_out.txt (this folder), and said to be.
Run: OMP_NUM_THREADS=1 ~/aspden-review-venv/bin/python3 report_numbers.py > report_numbers_out.txt 2> report_numbers_err.txt
"""
import math
import subprocess
import sys
import numpy as np
from scipy.integrate import quad
hbar = 1.054571817e-34
c = 299792458.0
eV = 1.602176634e-19
G = 6.67430e-11 # CODATA 2018, from memory
hbarc_eVm = hbar * c / eV
PC = 3.0856775814913673e16
M_PL = math.sqrt(hbar * c / G)
L_PL = math.sqrt(hbar * G / c**3)
RHO_PL = M_PL / L_PL**3
eps0 = 8.8541878128e-12
qe = eV
# The trial's cosmology (inputs of its lock)
H0 = 67.4e3 / (PC * 1e6)
OM = 0.3153
ZS = 0.903
NCHECK = [0, 0]
def check(ok, text, detail=""):
NCHECK[1] += 1
NCHECK[0] += 1 if ok else 0
print(f" CHECK {'pass' if ok else 'FAIL'}: {text} {detail}")
def Hz(z):
return H0 * math.sqrt(OM * (1 + z) ** 3 + 1 - OM)
def Tn(n, z=ZS):
return quad(lambda zz: (1 + zz) ** n / Hz(zz), 0, z)[0]
def head(t):
print()
print("=" * 100)
print(t)
print("=" * 100)
def main():
print("Numbers for REPORT.md that the earlier scripts did not print. 29th reviewer, post hoc, own code.")
try:
h = subprocess.run(["git", "rev-parse", "HEAD"], capture_output=True, text=True).stdout.strip()
except Exception as exc: # noqa: BLE001
h = f"(git not available: {exc})"
print(f"git HEAD: {h} ; python {sys.version.split()[0]} ; numpy {np.__version__}")
T0, T1, T2 = Tn(0), Tn(1), Tn(2)
print(f"T0 = {T0:.4e} s ; T1 = {T1:.4e} s ; T2 = {T2:.4e} s ; Planck mass {M_PL:.4e} kg ; Planck density {RHO_PL:.3e} kg/m^3")
# ------------------------------------------------------------------------------------------
head("1. Evenness for each photon, written as a mass density (it does not depend on the spacing)")
print(" Scattering by the sites' own zero-point sound (trial 20's form, Lorentz local field):")
print(" mu = k^4 h2^2 LF a^3 S/(6 pi), LF = ((1/f + 2)/3)^2 ; S = hbar k/(2 M c_s) ; optical depth 1 over the path L.")
print(" Needed cell mass M = hbar k^5 h2^2 LF a^3 L/(12 pi c_s): it goes as a^3, so the needed DENSITY is the same at every spacing:")
print(" rho = M/a^3 = hbar k^5 h2^2 LF L/(12 pi c_s).")
photons = (("GRB 090510, 28 GeV, path c T0", 28e9, c * T0),
("the Crab, 1.1 PeV, 1887 pc", 1.1e15, 1887 * PC),
("LHAASO, 1.42 PeV, 1.4 kpc", 1.42e15, 1.4e3 * PC))
print(f" {'photon and path':34s}{'f':7s}{'rho, sound at c':20s}{'of Planck density':20s}{'rho, sound at 0.1 c':22s}")
rho_keep = {}
for lab, E, L in photons:
k = E / hbarc_eVm
for f in (0.25, 0.085):
h2 = 1 - f
LF = ((1 / f + 2) / 3) ** 2
rho = hbar * k**5 * h2**2 * LF * L / (12 * math.pi * c)
rho_keep[(lab, f)] = rho
print(f" {lab:34s}{f:<7.3f}{rho:<20.3e}{rho / RHO_PL:<20.2e}{10 * rho:<22.3e}")
# check against compare_trial23_out.txt line 88: 84.5 kg at a = 1.69e-28 m
a_edge = 1.69e-28
m_cell = rho_keep[("LHAASO, 1.42 PeV, 1.4 kpc", 0.25)] * a_edge**3
check(abs(m_cell / 84.5 - 1) < 0.01, "LHAASO, f = 0.25: density x (1.69e-28 m)^3 equals the comparison stage's 84.5 kg per cell", f"({m_cell:.2f} kg)")
# the q = e oscillator at the classical edge
E2 = 2.688e20
om2 = E2 * eV / hbar
m_osc = a_edge**-3 * qe**2 / (eps0 * om2**2 * 0.75)
rho_osc = m_osc / a_edge**3
print(f" the q = e oscillator at the classical edge ((e) hold, a = {a_edge:.2e} m): m = {m_osc:.3e} kg ; its own mass density {rho_osc:.2e} kg/m^3")
kL = 1.42e15 / hbarc_eVm
mu1 = kL**4 * 0.75**2 * 4.0 * a_edge**3 / (6 * math.pi)
S_osc = hbar * kL / (2 * m_osc * c)
print(f" 1.42 PeV photon at that spacing: gas-like level (S = 1): mu = {mu1:.1f} /m, mean free path {1e3 / mu1:.2f} mm ;")
print(f" sites as heavy as the oscillator, sound at c: S = {S_osc:.3e}, mean free path {1 / (mu1 * S_osc):.0f} m, against the path {1.4e3 * PC:.2e} m: short by {1.4e3 * PC * mu1 * S_osc:.1e}")
print(f" k a = {kL * a_edge:.2e} (far below 1: the long-wave form applies)")
lab = "GRB 090510, 28 GeV, path c T0"
print(f" 28 GeV photon over the burst's path: needed density {rho_keep[(lab, 0.25)]:.2e} kg/m^3 ; the oscillators' own {rho_osc:.2e} kg/m^3 is {rho_osc / rho_keep[(lab, 0.25)]:.1f} times that: met.")
# ------------------------------------------------------------------------------------------
head("2. Kinematics of scattering off zero-point sound (a photon makes one sound quantum; none can be taken at zero temperature)")
print(" Photon k -> k' at angle th, sound quantum q = k - k' with frequency c_s |q|, b = c_s/c, r = k'/k, u = 1 - cos th:")
print(" (1 - r)^2 (1 - b^2) = 2 r b^2 u. For b >= 1 the left side is <= 0 and the right > 0: no solution (forbidden).")
print(" For b < 1: r = 1/(A + sqrt(A^2 - 1)), A = 1 + b^2 u/(1 - b^2) (the root below 1, written without a subtraction).")
print(" The rate goes as k k'^3 S(q) (the two fields' amplitudes and the scattered light's own states), so it falls roughly as r^3.")
print(f" {'b = c_s/c':14s}{'r at 90 deg':16s}{'r^3':14s}{'r at 180 deg':16s}{'r^3':14s}")
def r_of(b, u):
A = 1 + b * b * u / (1 - b * b)
return 1 / (A + math.sqrt(A * A - 1))
worst = 0.0
for b in (0.01, 0.03, 0.1, 0.3, 0.5, 0.9, 0.99, 0.999, 0.999995):
row = f" {b:<14.6f}"
for u in (1.0, 2.0):
r = r_of(b, u)
# residual of the conservation law, relative to its right-hand side
worst = max(worst, abs((1 - r) ** 2 * (1 - b * b) / (2 * r * b * b * u) - 1))
row += f"{r:<16.4e}{r**3:<14.3e}"
print(row)
check(worst < 1e-9, "the root satisfies the conservation law in every row", f"(worst relative residual {worst:.1e})")
r_need = 1e-16 ** (1 / 3)
one_minus_b2 = 2 * r_need / (1 + r_need) ** 2 * 1.0 # from (1 - r)^2 (1 - b^2) = 2 r b^2 at u = 1, solved for 1 - b^2 below
# exact: (1 - b^2) = 2 r/( (1 - r)^2 + 2 r ) at u = 1
one_minus_b2 = 2 * r_need / ((1 - r_need) ** 2 + 2 * r_need)
print(f" A fall of 1e16 (what the 1.42 PeV photon needs at the classical edge, section 1) takes r = {r_need:.2e} at 90 deg:")
print(f" 1 - b^2 = {one_minus_b2:.2e}, that is sound within {one_minus_b2 / 2:.1e} of c.")
print(f" At b = 0.1: r = {r_of(0.1, 1.0):.3f} (90 deg), {r_of(0.1, 2.0):.3f} (180 deg); r^3 = {r_of(0.1, 1.0)**3:.2f}, {r_of(0.1, 2.0)**3:.2f}: section 1's figures hold within a factor of 2")
print(" for sound up to about 0.1 c. Nearer c they overstate the scattering. Sound at c to the precision above, sound faster")
print(" than light, or sites that cannot move at all, escape.")
# numeric confirmation that b > 1 has no root
bad = 0
for b in (1.0001, 1.1, 2.0):
for u in np.linspace(1e-6, 2, 400):
r = np.linspace(1e-9, 1, 4000)
g = (1 - r) ** 2 * (1 - b * b) - 2 * r * b * b * u
bad += int(np.any(g >= 0))
check(bad == 0, "for sound faster than light the conservation law has no solution at any angle (scan)")
# ------------------------------------------------------------------------------------------
head("3. The grain term against the resonance term, for the three lattices (coefficients from dipole_lattice_bravais_out.txt)")
LAT = {"simple cubic": (-1.891532, +0.164847, -1.770000),
"body-centred cubic": (-1.925641, -0.294623, +0.510296),
"face-centred cubic": (-1.925521, -0.298704, +0.530757)}
print(" To order E^2: n^2 - 1 = h2 x^2 [1 + 2 c_n xi^2/h2], x = E/E2, xi = E2 d/(hbar c), c_n = B (1 - f)^2/(8 pi), B = b1 + (b2 + b3 S)/f.")
print(" ratio = grain/resonance = 2 c_n xi^2/h2 ; the E^2 dispersion vanishes at xi_c = sqrt(h2/(2 |c_n|)) when c_n < 0.")
xi_e = 2.688e20 * 3.0e-27 / hbarc_eVm
print(f" xi at the classical edge: 0.2304 ; xi at the trial's (e) row (hold 2.688e20 eV, 3.0e-27 m): {xi_e:.3f}")
print(f" {'lattice':22s}{'f':7s}{'S':7s}{'c_n':12s}{'ratio at 0.2304':18s}{'ratio at (e) row':18s}{'xi_c':8s}")
xic = {}
for name, (b1, b2, b3) in LAT.items():
for f in (0.25, 0.085):
h2 = 1 - f
for S in (0.0, 1 / 3, 0.5):
B = b1 + (b2 + b3 * S) / f
cn = B * (1 - f) ** 2 / (8 * math.pi)
r1 = 2 * cn * 0.2304**2 / h2
r2 = 2 * cn * xi_e**2 / h2
xc = math.sqrt(h2 / (2 * abs(cn))) if cn < 0 else float("nan")
xic[(name, f, round(S, 3))] = (cn, xc)
print(f" {name:22s}{f:<7.3f}{S:<7.3f}{cn:<+12.5f}{r1:<+18.4f}{r2:<+18.3f}{xc:<8.3f}")
# body-centred, f = 0.25: tune the cancellation for the cube diagonal (S = 1/3); what is left elsewhere
cn0, _ = xic[("body-centred cubic", 0.25, 0.0)]
cn3, x3 = xic[("body-centred cubic", 0.25, 0.333)]
cn5, _ = xic[("body-centred cubic", 0.25, 0.5)]
net0 = 1 + 2 * cn0 * x3**2 / 0.75
net5 = 1 + 2 * cn5 * x3**2 / 0.75
print(f" body-centred, f = 0.25, spacing tuned so that S = 1/3 cancels (xi = {x3:.3f}, xi^2 = {x3**2:.2f}): what is left is {net0:+.3f} (S = 0) to {net5:+.3f} (S = 1/2)")
print(f" of the resonance term. The hold bound goes as the square root: relaxed by at most {1 / math.sqrt(max(abs(net0), abs(net5))):.2f} over all directions.")
cs0, xs0 = xic[("simple cubic", 0.25, 0.0)]
cs5, xs5 = xic[("simple cubic", 0.25, 0.5)]
print(f" simple cubic, f = 0.25: tuned for S = 0 (xi = {xs0:.3f}) leaves {1 + 2 * cs5 * xs0**2 / 0.75:+.2f} at S = 1/2 ; tuned for S = 1/2 (xi = {xs5:.3f}) leaves {1 + 2 * cs0 * xs5**2 / 0.75:+.2f} at S = 0.")
check(abs(xic[("simple cubic", 0.25, 0.0)][0] - (-0.02758)) < 2e-5, "simple cubic, f = 0.25, S = 0: c_n equals the direct solution's -0.02758 (dipole_lattice_dispersion_out.txt)")
# ------------------------------------------------------------------------------------------
head("4. Where the electric part equals the retardation part (the record's line 597 used 1/8 for the second)")
print(" (1 - f)^2 3 beta/(2 f) = (1 - f)^2 3 R -> f = beta/(2 R), R = -b1/(8 pi)")
for name, beta in (("body-centred cubic", 0.00314), ("body-centred cubic", 0.02345), ("simple cubic", 0.05731)):
R = -LAT[name][0] / (8 * math.pi)
# the record's version: (1 - f)^2 3 beta/(2 f) = 1/8, solved for f
lo, hi = 1e-6, 0.999
for _ in range(200):
mid = 0.5 * (lo + hi)
if (1 - mid) ** 2 * 3 * beta / (2 * mid) > 0.125:
lo = mid
else:
hi = mid
print(f" {name:22s} beta = {beta:.5f}: R = {R:.6f}, 3R = {3 * R:.5f} ; f = beta/(2R) = {beta / (2 * R):.4f} ; the record's rule (against 1/8): f = {lo:.3f}")
# ------------------------------------------------------------------------------------------
head("5. Spacing bounds for a relay of dipoles by Abdo's limit (f) (19 ms, an advance, the 0.75 GeV photon)")
print(" d below sqrt(dt/(|coefficient| T2))/k ; (f) is weaker than (e) by (E_e/E_f) sqrt(19/10).")
for Ef, lab in ((0.75e9, "0.75 GeV"), (0.694e9, "0.694 GeV (Abdo's 1-sigma lower limit)")):
fac = (28e9 / Ef) * math.sqrt(1.9)
print(f" with {lab}: {fac:.1f} times weaker than (e) at 28 GeV")
for name, vals in (("simple cubic", (-0.0827, -0.2412, -0.3204)), ("body-centred cubic", (-0.2084, -0.1627, -0.1399)),
("face-centred cubic", (-0.2095, -0.1620, -0.1382))):
k = Ef / hbarc_eVm
ds = [math.sqrt(0.019 / (abs(v) * T2)) / k for v in vals]
ke = 28e9 / hbarc_eVm
de = [math.sqrt(0.010 / (abs(v) * T2)) / ke for v in vals]
print(f" {name:22s} f = 0.25: by (f): {min(ds):.2e} to {max(ds):.2e} m ; by (e): {min(de):.2e} to {max(de):.2e} m")
# ------------------------------------------------------------------------------------------
head("6. Level 1: the time per unit share, and what each limit gives")
E1 = 511e3
def phi(x):
return x * x * (3 - x * x) / (1 - x * x) ** 2
def per_share(Elo, Ehi):
return quad(lambda z: 0.5 * (phi(Elo * (1 + z) / E1) - phi(Ehi * (1 + z) / E1)) / Hz(z), 0, ZS)[0]
t28 = per_share(0.1e6, 28e9)
t31 = per_share(0.1e6, 31e9)
t075 = per_share(0.1e6, 0.75e9)
print(f" n_g - 1 = (h1/2) x^2 (3 - x^2)/(1 - x^2)^2, x = E (1 + z)/511 keV ; the low photon (0.1 MeV) minus the high one, summed over the path:")
print(f" per unit share: {t28:.5e} s (28 GeV), {t31:.5e} s (31 GeV), {t075:.5e} s (0.75 GeV) ; {t28 / T0:.4f} of T0. Positive: the HIGH photon arrives first.")
check(abs(t28 / 2.07258e17 - 1) < 1e-4, "equals my blind 2.07258e17 s and the trial's 2.073e17 s")
for lab, dt, t in (("(e), 10 ms, either sign", 0.010, t28), ("(f), 19 ms, an advance, 0.75 GeV photon", 0.019, t075),
("0.859 s (limit (a), which is for a delay: NOT a bound on this advance)", 0.859, t28),
("200 s (the whole LAT emission: a single photon's safe advance bound)", 200.0, t28)):
print(f" {lab:75s} h1 < {dt / t:.3e}")
print(" trial 11's kappa < 1.5e-16 as a share (kappa^2 x 0.5 or 1.0): 1.1e-32 to 2.3e-32 ; the sweep (blind addendum A2): 1.8e-39 to 3.0e-39.")
print()
print(f"Checks: {NCHECK[0]} of {NCHECK[1]} pass.")
if __name__ == "__main__":
main()