HTML-first calculator and reproducibility harness for the HQIV orbital flyby paper.
The physics implementation remains anchored in the symlinked HQIV_LEAN tree; this
repository adds a local API, SPICE ephemerides, integrator/drag/Monte-Carlo wrappers,
and paper-generation helpers.
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
export PYTHONPATH="${PWD}/HQIV_LEAN/scripts:${PWD}"On Python installations that enforce PEP 668, keep dependencies in .venv/. The
helper script scripts/serve_calculator.sh also prepends .venv site-packages while
running under system python3, which lets it reuse system numpy/scipy if those are
already installed.
Download NAIF kernels when you want SPICE/JPL ephemerides:
bash scripts/download_naif_kernels.shThe HQIV_LEAN/ directory is a local symlink to /home/jr/Repos/HQIV_LEAN and is
ignored by git so this repository never commits the Lean tree by accident.
bash scripts/serve_calculator.shThen open:
orbital_flyby_calculator.html— flyby catalog, MC, falsificationgalaxy_rotation_calculator.html— single-exponential disk rotation curves
Both pages call the local FastAPI server at http://127.0.0.1:8000.
python -m hqiv_orbital.cli --case near_1998 --ephemeris mean --integrator rk4
python -m hqiv_orbital.cli --case near_1998 --prograde-retrograde
python -m hqiv_orbital.cli --catalog earth --run-all --paper-nominal --ephemeris spice
python -m hqiv_orbital.cli --case near_1998 --mc 1000 --drag
python -m hqiv_orbital.cli --falsification-tableUse --ephemeris mean for a dependency-light run. Use --ephemeris spice after
kernel download to test the Rosetta-I geometry hypothesis against JPL ephemerides.
The same HQIV modified-inertia and mass-horizon Doppler equations used in the
flyby calculator power a single-exponential baryonic disk model. Use the HTML tool
(with bash scripts/serve_calculator.sh) or the Lean-backed CLI:
# Interactive dashboard (recommended)
bash scripts/serve_calculator.sh
# open galaxy_rotation_calculator.html
# CLI
PYTHONPATH="${PWD}/HQIV_LEAN/scripts:${PWD}" \
python HQIV_LEAN/scripts/hqiv_galaxy_rotation.py --disk-mass-msun 6e10 --scale-kpc 2.6
PYTHONPATH="${PWD}/HQIV_LEAN/scripts:${PWD}" \
python HQIV_LEAN/scripts/hqiv_galaxy_rotation.py --list-presets
PYTHONPATH="${PWD}/HQIV_LEAN/scripts:${PWD}" \
python HQIV_LEAN/scripts/hqiv_galaxy_rotation.py --preset ngc3198By default the galaxy calculator keeps the angular Rindler denominator used by
the local Milky-Way disk term. Uncheck it in the HTML UI (or pass
--no-rindler-denominator on the CLI) to inspect the unsuppressed co-rotating
disk-horizon limit. Named presets are approximate first-pass baryonic inputs for
sanity checks, not a full SPARC mass-model import.
Bound two-body orbits use the same inertia screen and co-spin mass-horizon Doppler term, integrated in a barycentric frame:
PYTHONPATH="${PWD}/HQIV_LEAN/scripts:${PWD}" \
python HQIV_LEAN/scripts/hqiv_wide_binary.py --list-presets
PYTHONPATH="${PWD}/HQIV_LEAN/scripts:${PWD}" \
python HQIV_LEAN/scripts/hqiv_wide_binary.py --preset demo_wide_eccentric
PYTHONPATH="${PWD}/HQIV_LEAN/scripts:${PWD}" \
python HQIV_LEAN/scripts/hqiv_wide_binary.py --preset literature_scale_10kau --t-yr 0.1Presets are order-of-magnitude demonstration systems. For the Chae (2026) / Saad & Ting (2026) debate (arXiv:2601.21728, arXiv:2603.11015), the bundled CSVs support a full treatment of one reference system:
PYTHONPATH="${PWD}/HQIV_LEAN/scripts:${PWD}" \
python HQIV_LEAN/scripts/hqiv_wide_binary.py --list-chae
PYTHONPATH="${PWD}/HQIV_LEAN/scripts:${PWD}" \
python HQIV_LEAN/scripts/hqiv_wide_binary.py --full-treatment --chae-id 58System chae2026_58 (HARPS RV, --velocity-mode gaia_pm_rv to compare against raw PM+RV speed instead of
Chae-scaled
Batch all 36 clean-sample systems:
PYTHONPATH="${PWD}/HQIV_LEAN/scripts:${PWD}" \
python HQIV_LEAN/scripts/hqiv_wide_binary.py --run-all-chaeWrites HQIV_LEAN/scripts/artifacts/wide_binary_chae2026_all_summary.json.
python -m hqiv_orbital.cli --catalog earth --run-all --paper-nominal --ephemeris spice \
--output artifacts/orbital_flyby_results_spice.json
python -m hqiv_orbital.cli --paper-table --ephemeris spice \
> HQIV_LEAN/papers/flyby_paper_table.texThe paper source is HQIV_LEAN/papers/hqiv_orbital_flyby_anomaly.tex.