Skip to content

HQIV/orbital-calculator

Repository files navigation

HQIV Orbital Calculator

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.

Setup

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.sh

The 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.

Run the calculator

bash scripts/serve_calculator.sh

Then open:

  • orbital_flyby_calculator.html — flyby catalog, MC, falsification
  • galaxy_rotation_calculator.html — single-exponential disk rotation curves

Both pages call the local FastAPI server at http://127.0.0.1:8000.

CLI examples

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-table

Use --ephemeris mean for a dependency-light run. Use --ephemeris spice after kernel download to test the Rosetta-I geometry hypothesis against JPL ephemerides.

Galaxy rotation

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 ngc3198

By 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.

Wide binaries

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.1

Presets 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 58

System chae2026_58 (HARPS RV, $v_{\rm obs}/v_{\rm esc}\approx0.35$) is the default reference. Use --velocity-mode gaia_pm_rv to compare against raw PM+RV speed instead of Chae-scaled $v$. HQIV gives ppm-level $\gamma_{\rm eff}=a_{\rm HQIV}/a_{\rm N}$, not the $\gamma\approx1.6$ inferred in that literature when orbital geometry is marginalized.

Batch all 36 clean-sample systems:

PYTHONPATH="${PWD}/HQIV_LEAN/scripts:${PWD}" \
  python HQIV_LEAN/scripts/hqiv_wide_binary.py --run-all-chae

Writes HQIV_LEAN/scripts/artifacts/wide_binary_chae2026_all_summary.json.

Paper regeneration

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.tex

The paper source is HQIV_LEAN/papers/hqiv_orbital_flyby_anomaly.tex.

About

An HQIV Implementation of Gravity and Inertia

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors