#!/usr/bin/env python3 """Single entry point: regenerates every number, table and figure of the flyby study. python3 code/run_all.py # full run: about 25-30 min single-threaded once # the catalogues are cached (downloads add ~15 min) python3 code/run_all.py --quick # one realisation per simulation cell, fewer # robustness cases (about 15 min) Raw catalogues are downloaded (and cached) into $FLYBY_RAW, default fermi_raw/flyby/. Derived tables go to data/, figures to figures/. """ import os import subprocess import sys import time HERE = os.path.dirname(os.path.abspath(__file__)) STEPS = [ ("download_data.py", []), ("s1_density_kinematics.py", []), ("s2_census.py", []), ("s4_settlement.py", ["--quick"] if "--quick" in sys.argv else []), ("s3_exposure.py", []), # needs the delta-v table written by s4 ("s5_figures.py", []), ("s6_summary.py", []), ] def main(): for script, args in STEPS: t0 = time.time() print(f"\n===== {script} {' '.join(args)}", flush=True) subprocess.run([sys.executable, os.path.join(HERE, script)] + args, check=True, cwd=HERE) print(f"===== {script} done in {time.time() - t0:.0f} s", flush=True) if __name__ == "__main__": main()