Precomputed tables
Inputs computed offline with IRBEM and Geant4, checked in with recorded hashes.
Purpose
Two model inputs require tools that do not run in a browser:
- Radiation belts and field geometry: the AP8 and AE8 models, the reference magnetic field and the McIlwain parameter, through the IRBEM library (Fortran).
- Shielding: Geant4 transport, about 30 minutes of computation per wall thickness.
These are computed once by the Python reference engine and stored as tables; the browser model computes everything else.
Tables
| File | What it holds | Produced by | Tools | Size |
|---|---|---|---|---|
data/orbit_data.json | Orbit-averaged AP8/AE8 trapped proton and electron spectra (solar minimum and maximum, with and without the low-orbit proton correction), and the sampling of McIlwain L and magnetic latitude along each of 68 orbits: 13 altitudes by 5 inclinations, plus GEO, Molniya and GTO. | engine/scripts/build_orbit_data.py | SpacePy 0.7 (IRBEM: AP8/AE8, IGRF) | 512 kB |
data/shield_data.json | Geant4 response matrices of a spherical aluminum shell at 0.3, 1, 3, 10, 30, 60 and 100 g/cm², packed for the browser (5 output bins per decade, 0.06 dex steps), with water stopping powers and the neutron and photon dose coefficients. | engine/scripts/build_shield_data.py | NumPy | 487 kB |
data/trapped.json | AP8/AE8 equatorial flux against L, and its dependence on B/B0, in three energy bands per species and for solar minimum and maximum. It places the radiation-belt tracers and the local readouts of the 3D explorer. | engine/scripts/build_trapped_data.py | SpacePy 0.7 (IRBEM: AP8/AE8, IGRF) | 54 kB |
engine/spacerad/data/phi_usoskin2017_monthly.csv | Monthly solar modulation potential, 1951 to 2016, in MV. | Transcribed from Usoskin et al. (2017), Table 2 (reference usoskin_2017). | none | 4 kB |
engine/spacerad/data/shield/Al_0.3gcm2.npz | Response matrices of a spherical aluminum shell of 0.3 g/cm²: what an isotropic field outside becomes inside, by incident species and energy. | engine/scripts/build_shield_matrices.py | Geant4 11.4.1 (QBBC physics list, 0.1 mm production cut) through geant4_pybind 0.1.3 | 284 kB |
engine/spacerad/data/shield/Al_10gcm2.npz | Response matrices of a spherical aluminum shell of 10 g/cm²: what an isotropic field outside becomes inside, by incident species and energy. | engine/scripts/build_shield_matrices.py | Geant4 11.4.1 (QBBC physics list, 0.1 mm production cut) through geant4_pybind 0.1.3 | 333 kB |
engine/spacerad/data/shield/Al_1gcm2.npz | Response matrices of a spherical aluminum shell of 1 g/cm²: what an isotropic field outside becomes inside, by incident species and energy. | engine/scripts/build_shield_matrices.py | Geant4 11.4.1 (QBBC physics list, 0.1 mm production cut) through geant4_pybind 0.1.3 | 320 kB |
engine/spacerad/data/shield/Al_30gcm2.npz | Response matrices of a spherical aluminum shell of 30 g/cm²: what an isotropic field outside becomes inside, by incident species and energy. | engine/scripts/build_shield_matrices.py | Geant4 11.4.1 (QBBC physics list, 0.1 mm production cut) through geant4_pybind 0.1.3 | 321 kB |
engine/spacerad/data/shield/Al_3gcm2.npz | Response matrices of a spherical aluminum shell of 3 g/cm²: what an isotropic field outside becomes inside, by incident species and energy. | engine/scripts/build_shield_matrices.py | Geant4 11.4.1 (QBBC physics list, 0.1 mm production cut) through geant4_pybind 0.1.3 | 335 kB |
engine/spacerad/data/shield/neutral_dose.npz | Mean dose and dose equivalent in a water sphere of 15 cm radius per unit fluence of neutrons and photons. | engine/scripts/build_neutral_dose.py | Geant4 11.4.1 (QBBC physics list, 0.1 mm production cut) through geant4_pybind 0.1.3 | 5 kB |
engine/spacerad/data/shield/stopping.npz | Stopping powers of water and silicon by particle species, from Geant4: the basis of the charged-particle dose estimate. | engine/scripts/build_shield_matrices.py | Geant4 11.4.1 (QBBC physics list, 0.1 mm production cut) through geant4_pybind 0.1.3 | 78 kB |
engine/spacerad/data/shield/Al_60gcm2.npz | Response matrices of a spherical aluminum shell of 60 g/cm²: what an isotropic field outside becomes inside, by incident species and energy. | engine/scripts/build_shield_matrices.py | Geant4 11.4.1 (QBBC physics list, 0.1 mm production cut) through geant4_pybind 0.1.3 | 315 kB |
engine/spacerad/data/shield/Al_100gcm2.npz | Response matrices of a spherical aluminum shell of 100 g/cm²: what an isotropic field outside becomes inside, by incident species and energy. | engine/scripts/build_shield_matrices.py | Geant4 11.4.1 (QBBC physics list, 0.1 mm production cut) through geant4_pybind 0.1.3 | 291 kB |
Each table has a recorded SHA-256; a check fails if a table differs from its record, whether from an unrecorded rebuild or a manual edit.
Consequences for the browser model
- Orbits are restricted to a grid of 13 altitudes from 300 to 20 200 km by 5 inclinations, plus geostationary, Molniya and geostationary transfer. The Python engine accepts any orbit.
- Wall thickness is restricted to five values; the dose panel interpolates between them.
- Trapped fluxes on the grid carry an interpolation error of a few percent.
Regeneration
From the repository root, with the Python engine installed:
python engine/scripts/build_orbit_data.py about 2 minutes; needs SpacePy (IRBEM)
python engine/scripts/build_trapped_data.py needs SpacePy (IRBEM)
python engine/scripts/build_shield_data.py repacks the Geant4 matrices for the browser
node tools/data-manifest.mjs --write records the new hashes
python engine/scripts/build_parity_fixture.py refreshes the reference values for the parity tests
npm test
The Geant4 matrices are rebuilt with engine/scripts/build_shield_matrices.py; setup is described
in the engine's Geant4 notes.
Reference and browser implementations
The Python engine is the reference and is compared with measurements in validation. The browser model is a port, tested against the reference engine on integral fluxes and doses to 5 % in free space and 6 % behind a wall.