gph-qgp 0.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- gph_qgp-0.3.0/LICENSE +12 -0
- gph_qgp-0.3.0/PKG-INFO +188 -0
- gph_qgp-0.3.0/README.md +172 -0
- gph_qgp-0.3.0/pyproject.toml +31 -0
- gph_qgp-0.3.0/setup.cfg +4 -0
- gph_qgp-0.3.0/src/gph_qgp/__init__.py +42 -0
- gph_qgp-0.3.0/src/gph_qgp/__main__.py +6 -0
- gph_qgp-0.3.0/src/gph_qgp/birefringence.py +122 -0
- gph_qgp-0.3.0/src/gph_qgp/cli.py +882 -0
- gph_qgp-0.3.0/src/gph_qgp/collapse.py +278 -0
- gph_qgp-0.3.0/src/gph_qgp/constraints.py +1122 -0
- gph_qgp-0.3.0/src/gph_qgp/dispersion.py +175 -0
- gph_qgp-0.3.0/src/gph_qgp/foam.py +112 -0
- gph_qgp-0.3.0/src/gph_qgp/gup.py +149 -0
- gph_qgp-0.3.0/src/gph_qgp/neutrinos.py +133 -0
- gph_qgp-0.3.0/src/gph_qgp/pilot.py +586 -0
- gph_qgp-0.3.0/src/gph_qgp/superluminal.py +178 -0
- gph_qgp-0.3.0/src/gph_qgp.egg-info/PKG-INFO +188 -0
- gph_qgp-0.3.0/src/gph_qgp.egg-info/SOURCES.txt +33 -0
- gph_qgp-0.3.0/src/gph_qgp.egg-info/dependency_links.txt +1 -0
- gph_qgp-0.3.0/src/gph_qgp.egg-info/entry_points.txt +2 -0
- gph_qgp-0.3.0/src/gph_qgp.egg-info/requires.txt +6 -0
- gph_qgp-0.3.0/src/gph_qgp.egg-info/top_level.txt +1 -0
- gph_qgp-0.3.0/tests/test_birefringence.py +66 -0
- gph_qgp-0.3.0/tests/test_cli.py +47 -0
- gph_qgp-0.3.0/tests/test_collapse.py +88 -0
- gph_qgp-0.3.0/tests/test_constraints.py +137 -0
- gph_qgp-0.3.0/tests/test_csl.py +79 -0
- gph_qgp-0.3.0/tests/test_dispersion.py +60 -0
- gph_qgp-0.3.0/tests/test_foam.py +58 -0
- gph_qgp-0.3.0/tests/test_gup.py +70 -0
- gph_qgp-0.3.0/tests/test_neutrinos.py +82 -0
- gph_qgp-0.3.0/tests/test_pilot.py +144 -0
- gph_qgp-0.3.0/tests/test_quadratic.py +77 -0
- gph_qgp-0.3.0/tests/test_superluminal.py +103 -0
gph_qgp-0.3.0/LICENSE
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
GPH Quantum Gravity Phenomenology lab (gph_qgp) — version 0.1.0
|
|
2
|
+
Copyright (c) 2026 Walter Hivoina
|
|
3
|
+
|
|
4
|
+
This work is licensed under the Creative Commons Attribution 4.0
|
|
5
|
+
International License (CC BY 4.0).
|
|
6
|
+
|
|
7
|
+
You are free to share and adapt this material, even commercially, as long
|
|
8
|
+
as you give appropriate credit to Walter Hivoina, provide a link to the
|
|
9
|
+
license, and indicate if changes were made.
|
|
10
|
+
|
|
11
|
+
Full license text: https://creativecommons.org/licenses/by/4.0/legalcode
|
|
12
|
+
Human-readable summary: https://creativecommons.org/licenses/by/4.0/
|
gph_qgp-0.3.0/PKG-INFO
ADDED
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: gph-qgp
|
|
3
|
+
Version: 0.3.0
|
|
4
|
+
Summary: GPH Quantum Gravity Phenomenology lab: toy modified-mechanics experiments for teaching and exploration
|
|
5
|
+
Author-email: Walter Hivoina <whivoina@gmail.com>
|
|
6
|
+
License-Expression: CC-BY-4.0
|
|
7
|
+
Requires-Python: >=3.10
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Requires-Dist: numpy
|
|
11
|
+
Requires-Dist: scipy
|
|
12
|
+
Requires-Dist: matplotlib
|
|
13
|
+
Provides-Extra: dev
|
|
14
|
+
Requires-Dist: pytest; extra == "dev"
|
|
15
|
+
Dynamic: license-file
|
|
16
|
+
|
|
17
|
+
# gph-qgp — the GPH Quantum Gravity Phenomenology lab
|
|
18
|
+
|
|
19
|
+
A small Python package of **toy phenomenological models** for teaching
|
|
20
|
+
and exploration, built around the Graduation Protocol Hypothesis (GPH)
|
|
21
|
+
— Walter Hivoina's proposal that reality functions as a developmental
|
|
22
|
+
curriculum for consciousness.
|
|
23
|
+
|
|
24
|
+
The idea: pull the GPH paper, then *apply* modified mechanics to it.
|
|
25
|
+
Each module implements a real, standard toy model from quantum-gravity
|
|
26
|
+
phenomenology, so you can run the experiments yourself on simulated
|
|
27
|
+
data and see what the analysis looks like.
|
|
28
|
+
|
|
29
|
+
## What's inside
|
|
30
|
+
|
|
31
|
+
| Module | What it does |
|
|
32
|
+
|---|---|
|
|
33
|
+
| `dispersion` | Modified dispersion relations, orders n = 1 and n = 2 (Amelino-Camelia style): E² = p²c² + ηE^(n+2)/E_QG^n. GRB photon time-of-flight simulator + a fitter that recovers η from simulated arrivals at either order. |
|
|
34
|
+
| `foam` | Spacetime-foam distance fluctuations (Ng & van Dam): holographic δl ~ l_P^(2/3)·L^(1/3) and random-walk δl ~ √(l_P·L). Interferometer phase-noise simulation. |
|
|
35
|
+
| `collapse` | GRW stochastic-hit toy model on a 1-D wavefunction (split-step unitary evolution + Poisson hits), Diosi–Penrose collapse time τ ~ ħ/ΔE_grav, and CSL phenomenology (mass-proportional rate, spontaneous heating). The collapse step itself is an explicit, labelled **non-computable oracle boundary** — see below. |
|
|
36
|
+
| `superluminal` | Superluminal LIV branch: photon decay (γ → e⁺e⁻) thresholds, photon splitting (γ → 3γ) mean free path, vacuum Cherenkov for electrons, Crab photon survival. |
|
|
37
|
+
| `birefringence` | Helicity-dependent photon speed: polarisation rotation Δφ = ηE²D/(ħE_Pl·c), band depolarisation, GRB polarimetry simulation. |
|
|
38
|
+
| `gup` | Generalised uncertainty principle: minimal length, GUP-corrected harmonic-oscillator levels, amplitude-dependent frequency shift, GUP-corrected Hawking temperature and remnant mass. |
|
|
39
|
+
| `neutrinos` | Energy-dependent neutrino speed: SN1987A and TXS 0506+056 time-of-flight delays, IceCube-scale superluminal check. |
|
|
40
|
+
| `constraints` | Real published limits, verified against primary sources: GRB time-of-flight (Abdo 2009, Vasileiou 2013, LHAASO 2024, Yang 2024), LIGO O1 strain floor (Abbott 2016), Ng & van Dam 40-m bounds, Holometer (Chou 2017) — plus v0.3: LHAASO superluminal limits, GRB birefringence (Wei 2025), GUP resonator bound (Bushev 2019), CSL bounds (Carlesso 2016, Majorana 2022, XENONnT 2025), neutrino limits (SN1987A, TXS 0506+056, IceCube). Checks the toy models against them — see "Real limits" below. |
|
|
41
|
+
| `pilot` | The GPH sober blinded-pilot analysis pipeline (v3.2 §06): synthetic speckle generation, blinded-rater agreement (Cohen's κ, Fleiss' κ, Krippendorff's α), and camera-invariance checks. |
|
|
42
|
+
|
|
43
|
+
## Install
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
pip install -e .
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Python ≥ 3.10. Dependencies: numpy, scipy, matplotlib only.
|
|
50
|
+
|
|
51
|
+
## Quickstart
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
# Run one experiment: writes CSV results + a PNG plot into the output dir
|
|
55
|
+
python -m gph_qgp run --experiment dispersion --out results/
|
|
56
|
+
python -m gph_qgp run --experiment foam --out results/
|
|
57
|
+
python -m gph_qgp run --experiment collapse --out results/
|
|
58
|
+
python -m gph_qgp run --experiment pilot --out results/
|
|
59
|
+
python -m gph_qgp run --experiment superluminal --out results/
|
|
60
|
+
python -m gph_qgp run --experiment birefringence --out results/
|
|
61
|
+
python -m gph_qgp run --experiment gup --out results/
|
|
62
|
+
python -m gph_qgp run --experiment csl --out results/
|
|
63
|
+
python -m gph_qgp run --experiment neutrinos --out results/
|
|
64
|
+
|
|
65
|
+
# Compare the toy models with real published limits (v0.3)
|
|
66
|
+
python -m gph_qgp compare --out results/
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Try it with no install
|
|
70
|
+
|
|
71
|
+
- **Web lab (no install):** the interactive browser version runs the same mechanics live — dispersion, photon decay, GUP, CSL, neutrinos, birefringence — with sliders, real-event presets (GRB 090510, LHAASO 1.4 PeV, IceCube-170922A, the Crab) and SURVIVES / EXCLUDED verdicts.
|
|
72
|
+
- **Colab notebook (no install):** [](https://colab.research.google.com/github/frankleepink/graduation-protocol/blob/main/lab/gph-qgp/examples/gph-qgp-colab.ipynb) — `examples/gph-qgp-colab.ipynb` installs the lab from GitHub and runs dispersion, the real-limits comparison, and the pilot pipeline.
|
|
73
|
+
- **Install from PyPI (coming):** `pip install gph-qgp` — package builds clean and passes `twine check`; publishing needs a PyPI account + API token (see below).
|
|
74
|
+
|
|
75
|
+
## What running it looks like
|
|
76
|
+
|
|
77
|
+
`python -m gph_qgp compare` (v0.3, 117 tests pass) checks the toy models against real published limits. Sample output is in `sample-outputs/comparison.csv`:
|
|
78
|
+
|
|
79
|
+
- Linear dispersion, η = 1 at E_Pl — **EXCLUDED** (GRB time-of-flight: E_QG,1 > 12.3 E_Pl)
|
|
80
|
+
- Quadratic dispersion — **SURVIVES** (best limit 1.2e12 GeV, four orders below E_Pl)
|
|
81
|
+
- Random-walk foam at 4 km — **EXCLUDED** (LIGO would have seen it, factor ~2770)
|
|
82
|
+
- Holographic foam — **UNCONSTRAINED** (below LIGO sensitivity)
|
|
83
|
+
- Superluminal photons n=1 — **EXCLUDED**; n=2 — **SURVIVES**
|
|
84
|
+
- Superluminal electrons — **EXCLUDED**; birefringence η = 1 — **EXCLUDED**
|
|
85
|
+
- GUP β₀ = 1 — **SURVIVES**; CSL textbook GRW values — **EXCLUDED** (by the XENONnT preprint bound only)
|
|
86
|
+
- Diósi–Penrose parameter-free — **EXCLUDED**; neutrinos subluminal — **SURVIVE**, superluminal n=1 — **EXCLUDED**
|
|
87
|
+
|
|
88
|
+
Toy models only, simulated data only — never evidence for the hypothesis. A positive result in these sims demonstrates the analysis pipeline, never proof of simulation or curriculum.
|
|
89
|
+
|
|
90
|
+
## Real limits (v0.3) — where the models already die
|
|
91
|
+
|
|
92
|
+
`python -m gph_qgp compare` checks the package's own toy models
|
|
93
|
+
against published observations. Every number is verified against its
|
|
94
|
+
primary source (citation next to the number in `constraints.py`).
|
|
95
|
+
|
|
96
|
+
| Model | Real limit | Verdict |
|
|
97
|
+
|---|---|---|
|
|
98
|
+
| Linear dispersion, η = 1 at E_Pl | GRB time-of-flight: E_QG,1 > 1.2 E_Pl (Abdo et al. 2009, Nature 462, 331); > 7.6 E_Pl (Vasileiou et al. 2013, PRD 87, 122001); > 10 E_Pl (LHAASO 2024, PRL 133, 071501); > 12.3 E_Pl (Yang et al. 2024, JCAP 04, 060) | **EXCLUDED** — the Planck-scale linear model is below every published limit |
|
|
99
|
+
| Quadratic dispersion, η = 1 at E_Pl | Best subluminal limit E_QG,2 > 1.2×10¹² GeV (Yang et al. 2024) | **SURVIVES** — v0.3 tests a real quadratic model; the limit is four orders below E_Pl, so a Planck-scale quadratic term is allowed (v0.2 reported UNCONSTRAINED because the model had no quadratic term) |
|
|
100
|
+
| Random-walk foam, 4 km | LIGO O1 strain floor 10⁻²³/√Hz at 100 Hz (Abbott et al. 2016, PRL 116, 131103): predicted noise ~1.1×10⁻¹⁶ m/√Hz, ~2800× above the floor | **EXCLUDED** — LIGO would have seen it |
|
|
101
|
+
| Holographic foam, 4 km | Same LIGO floor: RMS fluctuation ~1.0×10⁻²² m, ~400× below the floor in a 1 Hz band | **UNCONSTRAINED** — below sensitivity, not tested |
|
|
102
|
+
| Hogan shear-symmetry holographic noise | Fermilab Holometer, final data ~10× below the Planck-scale prediction (Chou et al. 2017, CQG 34, 165005) | **EXCLUDED** — that specific model, not the holographic principle and not the generic holographic scaling |
|
|
103
|
+
|
|
104
|
+
### v0.3 — six new mechanics, same treatment
|
|
105
|
+
|
|
106
|
+
| Model | Real limit | Verdict |
|
|
107
|
+
|---|---|---|
|
|
108
|
+
| Superluminal photons, n = 1, E_LV = E_Pl | LHAASO 1.42 PeV Crab photon: E_LV > 2.74×10²⁴ GeV (He & Ma 2023, PLB 835, 137536); collaboration's own number 1.42×10²⁴ GeV (LHAASO 2022, PRL 128, 051102) | **EXCLUDED** — the photon would have decayed (γ → e⁺e⁻) |
|
|
109
|
+
| Superluminal photons, n = 2, E_LV = E_Pl | Photon splitting: E_LV > 1×10⁻³ M_Pl = 1.22×10¹⁶ GeV (LHAASO 2022, PRL 128, 051102) | **SURVIVES** — the splitting bound is only 10⁻³ M_Pl, and the pair-decay threshold at E_Pl is ~112 PeV, above the observed photon |
|
|
110
|
+
| Superluminal electrons, n = 1, E_LV = E_Pl | Crab 2.3 PeV parent electron: E_LV > 9.4×10²⁵ GeV (He & Ma 2023) | **EXCLUDED** — the electron would have radiated vacuum Cherenkov down to threshold |
|
|
111
|
+
| Vacuum birefringence, η = 1 | GRB polarimetry: \|η\| < 10⁻¹⁵, 95% CL (Wei et al. 2025, ApJ 983, 164) | **EXCLUDED** — a Planck-scale birefringence would scramble every GRB band |
|
|
112
|
+
| GUP, β₀ = 1 (Planck-length minimal length) | Sapphire resonator: β₀ < 5.2×10⁶ (Bushev et al. 2019, PRD 100, 066020) | **SURVIVES** — the bound is six orders above a Planck-length minimal length; the experiment cannot see β₀ = 1 |
|
|
113
|
+
| CSL, standard GRW values (λ = 10⁻¹⁶ /s, r_C = 10⁻⁷ m) | X-ray: λ/r_C² < 3.0×10⁻³ s⁻¹m⁻², 90% CL (XENONnT 2025, arXiv:2506.05507); < 0.494 (Majorana 2022); LISA Pathfinder λ < 3×10⁻⁸ /s at r_C = 10⁻⁷ m (Carlesso et al. 2016, PRD 94, 124036) | **EXCLUDED** — by the newest XENONnT X-ray bound (λ/r_C² = 10⁻²); Majorana and LISA Pathfinder alone would pass it |
|
|
114
|
+
| Diosi–Penrose, parameter-free (R₀ = 0) | Majorana: R₀ > 2.54×10⁻¹⁰ m (arXiv:2202.01343) | **EXCLUDED** — a cutoff-free DP model is ruled out |
|
|
115
|
+
| Neutrinos, subluminal, M_QG = E_Pl | SN1987A: M₁ > 2.7×10¹⁰ GeV, M₂ > 4.6×10⁴ GeV; TXS 0506+056 flare: M₁ > 10¹⁴ GeV, M₂ > 10⁹ GeV (Bustamante et al. 2024, arXiv:2408.15949) | **SURVIVES** — the strongest subluminal neutrino limit is five orders below E_Pl |
|
|
116
|
+
| Neutrinos, superluminal, n = 1, M_QG = E_Pl | IceCube PeV neutrinos: M_QG > ~10⁵ M_Pl (Borriello et al. 2013, PRD 87, 116009) | **EXCLUDED** — a superluminal PeV neutrino would lose energy by pair bremsstrahlung and never arrive |
|
|
117
|
+
|
|
118
|
+
The 40-m interferometer parameter bounds (Ng & van Dam, arXiv:gr-qc/9906003)
|
|
119
|
+
do not exclude either foam model at Planck scale — they only bound the
|
|
120
|
+
model length parameters. That distinction is kept explicit in the code:
|
|
121
|
+
a parameter bound is not an exclusion.
|
|
122
|
+
|
|
123
|
+
Or run the short standalone examples (no install needed):
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
python examples/grb_delay.py
|
|
127
|
+
python examples/foam_noise.py
|
|
128
|
+
python examples/collapse_toy.py
|
|
129
|
+
python examples/pilot_demo.py
|
|
130
|
+
python examples/real_limits.py
|
|
131
|
+
python examples/quadratic_dispersion.py
|
|
132
|
+
python examples/superluminal_photon.py
|
|
133
|
+
python examples/birefringence_grb.py
|
|
134
|
+
python examples/gup_oscillator.py
|
|
135
|
+
python examples/csl_bounds.py
|
|
136
|
+
python examples/sn1987a_neutrinos.py
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Run the tests:
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
pip install pytest
|
|
143
|
+
python -m pytest
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
## The collapse oracle — read this
|
|
147
|
+
|
|
148
|
+
`collapse.py` simulates unitary evolution and applies GRW hits as a
|
|
149
|
+
phenomenological rule for what a collapsed wavefunction would look
|
|
150
|
+
like *after the fact*. It does **not** simulate collapse itself.
|
|
151
|
+
`collapse_oracle()` always raises `CollapseNotSimulable`, marking the
|
|
152
|
+
point where an algorithmic simulation stops — following Faizal et al.
|
|
153
|
+
(arXiv:2507.22950), who argue that collapse requires actualising a
|
|
154
|
+
Gödelian truth, which no algorithm can produce. Redden
|
|
155
|
+
(arXiv:2512.11807) counters that undecidability constrains provability,
|
|
156
|
+
not execution; the oracle is a labelled boundary for exploration, not a
|
|
157
|
+
settled claim. The point is that the boundary is explicit instead of
|
|
158
|
+
being silently papered over with a random-number draw.
|
|
159
|
+
|
|
160
|
+
## Honesty section
|
|
161
|
+
|
|
162
|
+
- **Toy models, not real experiments.** The dispersion relation, foam
|
|
163
|
+
scalings, GRW hits and DP times are standard textbook toy models.
|
|
164
|
+
None of them has been observed; the foam models disagree with each
|
|
165
|
+
other by orders of magnitude.
|
|
166
|
+
- **Simulated data only.** Every number this package produces comes
|
|
167
|
+
from synthetic data generated inside the package. It contains no real
|
|
168
|
+
GRB data, no real interferometer data, and no real observer data.
|
|
169
|
+
- **Not evidence for GPH.** A "positive" result inside these
|
|
170
|
+
simulations only demonstrates that the analysis pipeline works as
|
|
171
|
+
designed — it can detect a pattern that was injected on purpose.
|
|
172
|
+
It is never proof of simulation, of a curriculum, or of anything
|
|
173
|
+
about the real world.
|
|
174
|
+
- **What it is for:** teaching the phenomenology, testing the pilot
|
|
175
|
+
analysis pipeline before real data exists, and giving people a
|
|
176
|
+
hands-on way to argue with the models.
|
|
177
|
+
|
|
178
|
+
## Links
|
|
179
|
+
|
|
180
|
+
- GPH paper v3.2: https://doi.org/10.5281/zenodo.24237333
|
|
181
|
+
- Repository: https://github.com/frankleepink/graduation-protocol
|
|
182
|
+
- Faizal et al., "Consequences of Undecidability in Physics on the Theory of Everything": https://arxiv.org/abs/2507.22950
|
|
183
|
+
- Redden, "Provability vs. Execution": https://arxiv.org/abs/2512.11807
|
|
184
|
+
|
|
185
|
+
## License
|
|
186
|
+
|
|
187
|
+
CC BY 4.0 — see `LICENSE`. Give credit to Walter Hivoina when you
|
|
188
|
+
share or adapt this work.
|
gph_qgp-0.3.0/README.md
ADDED
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
# gph-qgp — the GPH Quantum Gravity Phenomenology lab
|
|
2
|
+
|
|
3
|
+
A small Python package of **toy phenomenological models** for teaching
|
|
4
|
+
and exploration, built around the Graduation Protocol Hypothesis (GPH)
|
|
5
|
+
— Walter Hivoina's proposal that reality functions as a developmental
|
|
6
|
+
curriculum for consciousness.
|
|
7
|
+
|
|
8
|
+
The idea: pull the GPH paper, then *apply* modified mechanics to it.
|
|
9
|
+
Each module implements a real, standard toy model from quantum-gravity
|
|
10
|
+
phenomenology, so you can run the experiments yourself on simulated
|
|
11
|
+
data and see what the analysis looks like.
|
|
12
|
+
|
|
13
|
+
## What's inside
|
|
14
|
+
|
|
15
|
+
| Module | What it does |
|
|
16
|
+
|---|---|
|
|
17
|
+
| `dispersion` | Modified dispersion relations, orders n = 1 and n = 2 (Amelino-Camelia style): E² = p²c² + ηE^(n+2)/E_QG^n. GRB photon time-of-flight simulator + a fitter that recovers η from simulated arrivals at either order. |
|
|
18
|
+
| `foam` | Spacetime-foam distance fluctuations (Ng & van Dam): holographic δl ~ l_P^(2/3)·L^(1/3) and random-walk δl ~ √(l_P·L). Interferometer phase-noise simulation. |
|
|
19
|
+
| `collapse` | GRW stochastic-hit toy model on a 1-D wavefunction (split-step unitary evolution + Poisson hits), Diosi–Penrose collapse time τ ~ ħ/ΔE_grav, and CSL phenomenology (mass-proportional rate, spontaneous heating). The collapse step itself is an explicit, labelled **non-computable oracle boundary** — see below. |
|
|
20
|
+
| `superluminal` | Superluminal LIV branch: photon decay (γ → e⁺e⁻) thresholds, photon splitting (γ → 3γ) mean free path, vacuum Cherenkov for electrons, Crab photon survival. |
|
|
21
|
+
| `birefringence` | Helicity-dependent photon speed: polarisation rotation Δφ = ηE²D/(ħE_Pl·c), band depolarisation, GRB polarimetry simulation. |
|
|
22
|
+
| `gup` | Generalised uncertainty principle: minimal length, GUP-corrected harmonic-oscillator levels, amplitude-dependent frequency shift, GUP-corrected Hawking temperature and remnant mass. |
|
|
23
|
+
| `neutrinos` | Energy-dependent neutrino speed: SN1987A and TXS 0506+056 time-of-flight delays, IceCube-scale superluminal check. |
|
|
24
|
+
| `constraints` | Real published limits, verified against primary sources: GRB time-of-flight (Abdo 2009, Vasileiou 2013, LHAASO 2024, Yang 2024), LIGO O1 strain floor (Abbott 2016), Ng & van Dam 40-m bounds, Holometer (Chou 2017) — plus v0.3: LHAASO superluminal limits, GRB birefringence (Wei 2025), GUP resonator bound (Bushev 2019), CSL bounds (Carlesso 2016, Majorana 2022, XENONnT 2025), neutrino limits (SN1987A, TXS 0506+056, IceCube). Checks the toy models against them — see "Real limits" below. |
|
|
25
|
+
| `pilot` | The GPH sober blinded-pilot analysis pipeline (v3.2 §06): synthetic speckle generation, blinded-rater agreement (Cohen's κ, Fleiss' κ, Krippendorff's α), and camera-invariance checks. |
|
|
26
|
+
|
|
27
|
+
## Install
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
pip install -e .
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Python ≥ 3.10. Dependencies: numpy, scipy, matplotlib only.
|
|
34
|
+
|
|
35
|
+
## Quickstart
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
# Run one experiment: writes CSV results + a PNG plot into the output dir
|
|
39
|
+
python -m gph_qgp run --experiment dispersion --out results/
|
|
40
|
+
python -m gph_qgp run --experiment foam --out results/
|
|
41
|
+
python -m gph_qgp run --experiment collapse --out results/
|
|
42
|
+
python -m gph_qgp run --experiment pilot --out results/
|
|
43
|
+
python -m gph_qgp run --experiment superluminal --out results/
|
|
44
|
+
python -m gph_qgp run --experiment birefringence --out results/
|
|
45
|
+
python -m gph_qgp run --experiment gup --out results/
|
|
46
|
+
python -m gph_qgp run --experiment csl --out results/
|
|
47
|
+
python -m gph_qgp run --experiment neutrinos --out results/
|
|
48
|
+
|
|
49
|
+
# Compare the toy models with real published limits (v0.3)
|
|
50
|
+
python -m gph_qgp compare --out results/
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Try it with no install
|
|
54
|
+
|
|
55
|
+
- **Web lab (no install):** the interactive browser version runs the same mechanics live — dispersion, photon decay, GUP, CSL, neutrinos, birefringence — with sliders, real-event presets (GRB 090510, LHAASO 1.4 PeV, IceCube-170922A, the Crab) and SURVIVES / EXCLUDED verdicts.
|
|
56
|
+
- **Colab notebook (no install):** [](https://colab.research.google.com/github/frankleepink/graduation-protocol/blob/main/lab/gph-qgp/examples/gph-qgp-colab.ipynb) — `examples/gph-qgp-colab.ipynb` installs the lab from GitHub and runs dispersion, the real-limits comparison, and the pilot pipeline.
|
|
57
|
+
- **Install from PyPI (coming):** `pip install gph-qgp` — package builds clean and passes `twine check`; publishing needs a PyPI account + API token (see below).
|
|
58
|
+
|
|
59
|
+
## What running it looks like
|
|
60
|
+
|
|
61
|
+
`python -m gph_qgp compare` (v0.3, 117 tests pass) checks the toy models against real published limits. Sample output is in `sample-outputs/comparison.csv`:
|
|
62
|
+
|
|
63
|
+
- Linear dispersion, η = 1 at E_Pl — **EXCLUDED** (GRB time-of-flight: E_QG,1 > 12.3 E_Pl)
|
|
64
|
+
- Quadratic dispersion — **SURVIVES** (best limit 1.2e12 GeV, four orders below E_Pl)
|
|
65
|
+
- Random-walk foam at 4 km — **EXCLUDED** (LIGO would have seen it, factor ~2770)
|
|
66
|
+
- Holographic foam — **UNCONSTRAINED** (below LIGO sensitivity)
|
|
67
|
+
- Superluminal photons n=1 — **EXCLUDED**; n=2 — **SURVIVES**
|
|
68
|
+
- Superluminal electrons — **EXCLUDED**; birefringence η = 1 — **EXCLUDED**
|
|
69
|
+
- GUP β₀ = 1 — **SURVIVES**; CSL textbook GRW values — **EXCLUDED** (by the XENONnT preprint bound only)
|
|
70
|
+
- Diósi–Penrose parameter-free — **EXCLUDED**; neutrinos subluminal — **SURVIVE**, superluminal n=1 — **EXCLUDED**
|
|
71
|
+
|
|
72
|
+
Toy models only, simulated data only — never evidence for the hypothesis. A positive result in these sims demonstrates the analysis pipeline, never proof of simulation or curriculum.
|
|
73
|
+
|
|
74
|
+
## Real limits (v0.3) — where the models already die
|
|
75
|
+
|
|
76
|
+
`python -m gph_qgp compare` checks the package's own toy models
|
|
77
|
+
against published observations. Every number is verified against its
|
|
78
|
+
primary source (citation next to the number in `constraints.py`).
|
|
79
|
+
|
|
80
|
+
| Model | Real limit | Verdict |
|
|
81
|
+
|---|---|---|
|
|
82
|
+
| Linear dispersion, η = 1 at E_Pl | GRB time-of-flight: E_QG,1 > 1.2 E_Pl (Abdo et al. 2009, Nature 462, 331); > 7.6 E_Pl (Vasileiou et al. 2013, PRD 87, 122001); > 10 E_Pl (LHAASO 2024, PRL 133, 071501); > 12.3 E_Pl (Yang et al. 2024, JCAP 04, 060) | **EXCLUDED** — the Planck-scale linear model is below every published limit |
|
|
83
|
+
| Quadratic dispersion, η = 1 at E_Pl | Best subluminal limit E_QG,2 > 1.2×10¹² GeV (Yang et al. 2024) | **SURVIVES** — v0.3 tests a real quadratic model; the limit is four orders below E_Pl, so a Planck-scale quadratic term is allowed (v0.2 reported UNCONSTRAINED because the model had no quadratic term) |
|
|
84
|
+
| Random-walk foam, 4 km | LIGO O1 strain floor 10⁻²³/√Hz at 100 Hz (Abbott et al. 2016, PRL 116, 131103): predicted noise ~1.1×10⁻¹⁶ m/√Hz, ~2800× above the floor | **EXCLUDED** — LIGO would have seen it |
|
|
85
|
+
| Holographic foam, 4 km | Same LIGO floor: RMS fluctuation ~1.0×10⁻²² m, ~400× below the floor in a 1 Hz band | **UNCONSTRAINED** — below sensitivity, not tested |
|
|
86
|
+
| Hogan shear-symmetry holographic noise | Fermilab Holometer, final data ~10× below the Planck-scale prediction (Chou et al. 2017, CQG 34, 165005) | **EXCLUDED** — that specific model, not the holographic principle and not the generic holographic scaling |
|
|
87
|
+
|
|
88
|
+
### v0.3 — six new mechanics, same treatment
|
|
89
|
+
|
|
90
|
+
| Model | Real limit | Verdict |
|
|
91
|
+
|---|---|---|
|
|
92
|
+
| Superluminal photons, n = 1, E_LV = E_Pl | LHAASO 1.42 PeV Crab photon: E_LV > 2.74×10²⁴ GeV (He & Ma 2023, PLB 835, 137536); collaboration's own number 1.42×10²⁴ GeV (LHAASO 2022, PRL 128, 051102) | **EXCLUDED** — the photon would have decayed (γ → e⁺e⁻) |
|
|
93
|
+
| Superluminal photons, n = 2, E_LV = E_Pl | Photon splitting: E_LV > 1×10⁻³ M_Pl = 1.22×10¹⁶ GeV (LHAASO 2022, PRL 128, 051102) | **SURVIVES** — the splitting bound is only 10⁻³ M_Pl, and the pair-decay threshold at E_Pl is ~112 PeV, above the observed photon |
|
|
94
|
+
| Superluminal electrons, n = 1, E_LV = E_Pl | Crab 2.3 PeV parent electron: E_LV > 9.4×10²⁵ GeV (He & Ma 2023) | **EXCLUDED** — the electron would have radiated vacuum Cherenkov down to threshold |
|
|
95
|
+
| Vacuum birefringence, η = 1 | GRB polarimetry: \|η\| < 10⁻¹⁵, 95% CL (Wei et al. 2025, ApJ 983, 164) | **EXCLUDED** — a Planck-scale birefringence would scramble every GRB band |
|
|
96
|
+
| GUP, β₀ = 1 (Planck-length minimal length) | Sapphire resonator: β₀ < 5.2×10⁶ (Bushev et al. 2019, PRD 100, 066020) | **SURVIVES** — the bound is six orders above a Planck-length minimal length; the experiment cannot see β₀ = 1 |
|
|
97
|
+
| CSL, standard GRW values (λ = 10⁻¹⁶ /s, r_C = 10⁻⁷ m) | X-ray: λ/r_C² < 3.0×10⁻³ s⁻¹m⁻², 90% CL (XENONnT 2025, arXiv:2506.05507); < 0.494 (Majorana 2022); LISA Pathfinder λ < 3×10⁻⁸ /s at r_C = 10⁻⁷ m (Carlesso et al. 2016, PRD 94, 124036) | **EXCLUDED** — by the newest XENONnT X-ray bound (λ/r_C² = 10⁻²); Majorana and LISA Pathfinder alone would pass it |
|
|
98
|
+
| Diosi–Penrose, parameter-free (R₀ = 0) | Majorana: R₀ > 2.54×10⁻¹⁰ m (arXiv:2202.01343) | **EXCLUDED** — a cutoff-free DP model is ruled out |
|
|
99
|
+
| Neutrinos, subluminal, M_QG = E_Pl | SN1987A: M₁ > 2.7×10¹⁰ GeV, M₂ > 4.6×10⁴ GeV; TXS 0506+056 flare: M₁ > 10¹⁴ GeV, M₂ > 10⁹ GeV (Bustamante et al. 2024, arXiv:2408.15949) | **SURVIVES** — the strongest subluminal neutrino limit is five orders below E_Pl |
|
|
100
|
+
| Neutrinos, superluminal, n = 1, M_QG = E_Pl | IceCube PeV neutrinos: M_QG > ~10⁵ M_Pl (Borriello et al. 2013, PRD 87, 116009) | **EXCLUDED** — a superluminal PeV neutrino would lose energy by pair bremsstrahlung and never arrive |
|
|
101
|
+
|
|
102
|
+
The 40-m interferometer parameter bounds (Ng & van Dam, arXiv:gr-qc/9906003)
|
|
103
|
+
do not exclude either foam model at Planck scale — they only bound the
|
|
104
|
+
model length parameters. That distinction is kept explicit in the code:
|
|
105
|
+
a parameter bound is not an exclusion.
|
|
106
|
+
|
|
107
|
+
Or run the short standalone examples (no install needed):
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
python examples/grb_delay.py
|
|
111
|
+
python examples/foam_noise.py
|
|
112
|
+
python examples/collapse_toy.py
|
|
113
|
+
python examples/pilot_demo.py
|
|
114
|
+
python examples/real_limits.py
|
|
115
|
+
python examples/quadratic_dispersion.py
|
|
116
|
+
python examples/superluminal_photon.py
|
|
117
|
+
python examples/birefringence_grb.py
|
|
118
|
+
python examples/gup_oscillator.py
|
|
119
|
+
python examples/csl_bounds.py
|
|
120
|
+
python examples/sn1987a_neutrinos.py
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Run the tests:
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
pip install pytest
|
|
127
|
+
python -m pytest
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
## The collapse oracle — read this
|
|
131
|
+
|
|
132
|
+
`collapse.py` simulates unitary evolution and applies GRW hits as a
|
|
133
|
+
phenomenological rule for what a collapsed wavefunction would look
|
|
134
|
+
like *after the fact*. It does **not** simulate collapse itself.
|
|
135
|
+
`collapse_oracle()` always raises `CollapseNotSimulable`, marking the
|
|
136
|
+
point where an algorithmic simulation stops — following Faizal et al.
|
|
137
|
+
(arXiv:2507.22950), who argue that collapse requires actualising a
|
|
138
|
+
Gödelian truth, which no algorithm can produce. Redden
|
|
139
|
+
(arXiv:2512.11807) counters that undecidability constrains provability,
|
|
140
|
+
not execution; the oracle is a labelled boundary for exploration, not a
|
|
141
|
+
settled claim. The point is that the boundary is explicit instead of
|
|
142
|
+
being silently papered over with a random-number draw.
|
|
143
|
+
|
|
144
|
+
## Honesty section
|
|
145
|
+
|
|
146
|
+
- **Toy models, not real experiments.** The dispersion relation, foam
|
|
147
|
+
scalings, GRW hits and DP times are standard textbook toy models.
|
|
148
|
+
None of them has been observed; the foam models disagree with each
|
|
149
|
+
other by orders of magnitude.
|
|
150
|
+
- **Simulated data only.** Every number this package produces comes
|
|
151
|
+
from synthetic data generated inside the package. It contains no real
|
|
152
|
+
GRB data, no real interferometer data, and no real observer data.
|
|
153
|
+
- **Not evidence for GPH.** A "positive" result inside these
|
|
154
|
+
simulations only demonstrates that the analysis pipeline works as
|
|
155
|
+
designed — it can detect a pattern that was injected on purpose.
|
|
156
|
+
It is never proof of simulation, of a curriculum, or of anything
|
|
157
|
+
about the real world.
|
|
158
|
+
- **What it is for:** teaching the phenomenology, testing the pilot
|
|
159
|
+
analysis pipeline before real data exists, and giving people a
|
|
160
|
+
hands-on way to argue with the models.
|
|
161
|
+
|
|
162
|
+
## Links
|
|
163
|
+
|
|
164
|
+
- GPH paper v3.2: https://doi.org/10.5281/zenodo.24237333
|
|
165
|
+
- Repository: https://github.com/frankleepink/graduation-protocol
|
|
166
|
+
- Faizal et al., "Consequences of Undecidability in Physics on the Theory of Everything": https://arxiv.org/abs/2507.22950
|
|
167
|
+
- Redden, "Provability vs. Execution": https://arxiv.org/abs/2512.11807
|
|
168
|
+
|
|
169
|
+
## License
|
|
170
|
+
|
|
171
|
+
CC BY 4.0 — see `LICENSE`. Give credit to Walter Hivoina when you
|
|
172
|
+
share or adapt this work.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "gph-qgp"
|
|
7
|
+
version = "0.3.0"
|
|
8
|
+
description = "GPH Quantum Gravity Phenomenology lab: toy modified-mechanics experiments for teaching and exploration"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = "CC-BY-4.0"
|
|
11
|
+
requires-python = ">=3.10"
|
|
12
|
+
authors = [
|
|
13
|
+
{ name = "Walter Hivoina", email = "whivoina@gmail.com" },
|
|
14
|
+
]
|
|
15
|
+
dependencies = [
|
|
16
|
+
"numpy",
|
|
17
|
+
"scipy",
|
|
18
|
+
"matplotlib",
|
|
19
|
+
]
|
|
20
|
+
|
|
21
|
+
[project.optional-dependencies]
|
|
22
|
+
dev = ["pytest"]
|
|
23
|
+
|
|
24
|
+
[project.scripts]
|
|
25
|
+
gph-qgp = "gph_qgp.cli:main"
|
|
26
|
+
|
|
27
|
+
[tool.setuptools.packages.find]
|
|
28
|
+
where = ["src"]
|
|
29
|
+
|
|
30
|
+
[tool.pytest.ini_options]
|
|
31
|
+
testpaths = ["tests"]
|
gph_qgp-0.3.0/setup.cfg
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"""gph_qgp — the GPH Quantum Gravity Phenomenology lab (v0.3.0).
|
|
2
|
+
|
|
3
|
+
Toy phenomenological models for teaching and exploration, built around
|
|
4
|
+
the Graduation Protocol Hypothesis (GPH) paper, v3.2
|
|
5
|
+
(Zenodo DOI 10.5281/zenodo.24237333).
|
|
6
|
+
|
|
7
|
+
Modules
|
|
8
|
+
-------
|
|
9
|
+
dispersion : modified dispersion relations (n=1 and n=2) and GRB photon
|
|
10
|
+
time-of-flight
|
|
11
|
+
foam : spacetime-foam distance fluctuations and interferometer phase noise
|
|
12
|
+
collapse : GRW / Diosi-Penrose collapse toy models, CSL phenomenology,
|
|
13
|
+
with an explicit non-computable oracle boundary (collapse
|
|
14
|
+
itself is NOT simulated)
|
|
15
|
+
superluminal : superluminal LIV branch — photon decay, photon splitting,
|
|
16
|
+
vacuum Cherenkov
|
|
17
|
+
birefringence : helicity-dependent photon speed, GRB polarisation rotation
|
|
18
|
+
gup : generalised uncertainty principle — minimal length, oscillator
|
|
19
|
+
levels, black-hole temperature
|
|
20
|
+
neutrinos : energy-dependent neutrino speed, SN1987A / TXS 0506+056 /
|
|
21
|
+
IceCube time-of-flight
|
|
22
|
+
constraints: real published observational limits and checks of the toy
|
|
23
|
+
models against them
|
|
24
|
+
pilot : the GPH sober blinded-pilot analysis pipeline (speckle synthesis,
|
|
25
|
+
rater agreement, invariance checks)
|
|
26
|
+
cli : command-line runner (``python -m gph_qgp run --experiment ...``,
|
|
27
|
+
``python -m gph_qgp compare --out ...``)
|
|
28
|
+
|
|
29
|
+
Honesty note (read this first): everything here is a toy model running on
|
|
30
|
+
simulated data. Nothing in this package is a real experiment, and nothing it
|
|
31
|
+
produces is evidence for or against GPH, simulation, or a curriculum.
|
|
32
|
+
A "positive" result inside these simulations only demonstrates that the
|
|
33
|
+
analysis pipeline works as designed.
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
from . import (birefringence, collapse, constraints, dispersion, foam,
|
|
37
|
+
gup, neutrinos, pilot, superluminal)
|
|
38
|
+
|
|
39
|
+
__version__ = "0.3.0"
|
|
40
|
+
__all__ = ["birefringence", "collapse", "constraints", "dispersion",
|
|
41
|
+
"foam", "gup", "neutrinos", "pilot", "superluminal",
|
|
42
|
+
"__version__"]
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"""Vacuum birefringence: helicity-dependent photon speed (v0.3).
|
|
2
|
+
|
|
3
|
+
If Lorentz violation is helicity-dependent, left- and right-circularly
|
|
4
|
+
polarised photons travel at different speeds, and the plane of linear
|
|
5
|
+
polarisation rotates as the photon propagates. The rotation grows with
|
|
6
|
+
the square of the energy and with the distance, so a distant gamma-ray
|
|
7
|
+
burst (GRB) observed in polarised light is a sensitive probe: if the
|
|
8
|
+
rotation varied strongly across the observed energy band, the net
|
|
9
|
+
polarisation would wash out — and it does not.
|
|
10
|
+
|
|
11
|
+
Model (Toma et al. 2012; Wei et al. 2025 convention)
|
|
12
|
+
-----------------------------------------------------
|
|
13
|
+
Delta_phi(E) = eta * E^2 * D / (hbar * E_Pl * c)
|
|
14
|
+
|
|
15
|
+
where eta is the dimensionless birefringence parameter, E the photon
|
|
16
|
+
energy, D the source distance, and E_Pl the Planck energy. The two
|
|
17
|
+
helicities travel at v/c = 1 +/- eta * E / E_Pl, so the phase difference
|
|
18
|
+
between them accumulates as the square of the energy. (O(1) convention
|
|
19
|
+
factors differ between authors — some write xi instead of eta, or
|
|
20
|
+
absorb a factor of 2 — so the parameter below is the Wei et al. 2025
|
|
21
|
+
definition, and the bound quoted is in that definition.)
|
|
22
|
+
|
|
23
|
+
Verified limit (see constraints.py for the full citation)
|
|
24
|
+
--------------------------------------------------------
|
|
25
|
+
* |eta| < O(1e-15 - 1e-16), 95% CL, from energy-resolved polarimetry
|
|
26
|
+
of five GRBs (Wei et al., Astrophys. J. 983, 164 (2025),
|
|
27
|
+
arXiv:2503.18277). The module uses the conservative end,
|
|
28
|
+
|eta| < 1e-15, as the bound value.
|
|
29
|
+
|
|
30
|
+
Honesty note: the GRBs in the simulator are synthetic. The check
|
|
31
|
+
against the real bound is constraints.check_birefringence; a simulated
|
|
32
|
+
polarisation measurement that survives is a pipeline demonstration,
|
|
33
|
+
not a measurement of eta.
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
from __future__ import annotations
|
|
37
|
+
|
|
38
|
+
import numpy as np
|
|
39
|
+
|
|
40
|
+
# ---------------------------------------------------------------- constants
|
|
41
|
+
E_PLANCK_GEV = 1.22e19 # Planck energy, GeV
|
|
42
|
+
HBAR_GEV_S = 6.582119569e-25 # reduced Planck constant, GeV s
|
|
43
|
+
C_M_PER_S = 299_792_458.0 # speed of light, m/s
|
|
44
|
+
MPC_IN_M = 3.085677581491367e22 # one megaparsec, m
|
|
45
|
+
|
|
46
|
+
# Conservative end of the Wei et al. (2025) bound, |eta| < O(1e-15-1e-16).
|
|
47
|
+
ETA_LIMIT = 1.0e-15 # dimensionless, 95% CL
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def rotation_angle(energy_gev, distance_mpc, eta):
|
|
51
|
+
"""Polarisation rotation angle (radians) for a photon.
|
|
52
|
+
|
|
53
|
+
Delta_phi = eta * E^2 * D / (hbar * E_Pl * c). Sign follows eta;
|
|
54
|
+
the magnitude is what observations constrain. Works on scalars
|
|
55
|
+
and arrays.
|
|
56
|
+
"""
|
|
57
|
+
energy_gev = np.asarray(energy_gev, dtype=float)
|
|
58
|
+
distance_m = float(distance_mpc) * MPC_IN_M
|
|
59
|
+
return float(eta) * energy_gev**2 * distance_m / (
|
|
60
|
+
HBAR_GEV_S * E_PLANCK_GEV * C_M_PER_S)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
def rotation_difference(energy_low_gev, energy_high_gev, distance_mpc,
|
|
64
|
+
eta):
|
|
65
|
+
"""Rotation difference (radians) across an energy band.
|
|
66
|
+
|
|
67
|
+
Delta_phi(E_high) - Delta_phi(E_low). A difference of order pi/2
|
|
68
|
+
or more across the band washes out the net polarisation; that is
|
|
69
|
+
what the GRB polarimetry limits are really measuring.
|
|
70
|
+
"""
|
|
71
|
+
return float(rotation_angle(energy_high_gev, distance_mpc, eta)
|
|
72
|
+
- rotation_angle(energy_low_gev, distance_mpc, eta))
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
def band_polarization(energies_gev, distance_mpc, eta, p0=1.0):
|
|
76
|
+
"""Observed polarisation fraction after rotation across a band.
|
|
77
|
+
|
|
78
|
+
Each energy in the band rotates by a different angle, so the
|
|
79
|
+
polarisation vectors partially cancel. The surviving fraction is
|
|
80
|
+
p0 * |mean(exp(2i * Delta_phi))| over the band — 1 if nothing
|
|
81
|
+
rotates, ~0 if the band is fully scrambled. p0 is the intrinsic
|
|
82
|
+
(source) polarisation fraction.
|
|
83
|
+
"""
|
|
84
|
+
energies_gev = np.asarray(energies_gev, dtype=float)
|
|
85
|
+
angles = rotation_angle(energies_gev, distance_mpc, eta)
|
|
86
|
+
phasors = np.exp(2j * angles)
|
|
87
|
+
return float(p0 * abs(np.mean(phasors)))
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
def eta_limit(rotation_max_rad, energy_gev, distance_mpc):
|
|
91
|
+
"""Invert the rotation formula: the eta that would produce a given
|
|
92
|
+
rotation at a given energy and distance. Used to translate an
|
|
93
|
+
observed "no rotation larger than X" into a bound on eta."""
|
|
94
|
+
energy_gev = float(energy_gev)
|
|
95
|
+
distance_m = float(distance_mpc) * MPC_IN_M
|
|
96
|
+
if energy_gev <= 0 or distance_m <= 0:
|
|
97
|
+
raise ValueError("energy and distance must be > 0")
|
|
98
|
+
return float(rotation_max_rad) * HBAR_GEV_S * E_PLANCK_GEV * C_M_PER_S \
|
|
99
|
+
/ (energy_gev**2 * distance_m)
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
def simulate_grb_polarimetry(energies_gev, distance_mpc, eta, p0=1.0):
|
|
103
|
+
"""Simulate a GRB polarisation measurement under birefringence.
|
|
104
|
+
|
|
105
|
+
``energies_gev``: the observed energy band. Returns the rotation
|
|
106
|
+
per energy, the rotation spread across the band, and the surviving
|
|
107
|
+
polarisation fraction. A real GRB that is observed polarised with
|
|
108
|
+
p ~ 0.3-0.8 in a band like this rules out any eta that would
|
|
109
|
+
scramble it.
|
|
110
|
+
"""
|
|
111
|
+
energies_gev = np.asarray(energies_gev, dtype=float)
|
|
112
|
+
rotations = rotation_angle(energies_gev, distance_mpc, eta)
|
|
113
|
+
return {
|
|
114
|
+
"energies_gev": energies_gev,
|
|
115
|
+
"distance_mpc": float(distance_mpc),
|
|
116
|
+
"eta": float(eta),
|
|
117
|
+
"rotation_rad": rotations,
|
|
118
|
+
"rotation_spread_rad": float(rotations.max() - rotations.min()),
|
|
119
|
+
"polarization_fraction": band_polarization(
|
|
120
|
+
energies_gev, distance_mpc, eta, p0=p0),
|
|
121
|
+
"intrinsic_polarization": float(p0),
|
|
122
|
+
}
|