"""Single entry point: reruns the whole cold_occulters study from the public archives. python3 run_all.py # download (cached), analyse, write data/ and figures/ python3 run_all.py --quick # same, with a smaller injection-recovery sample python3 run_all.py --fresh # force re-download of every raw file Raw downloads (about 2.9 GB) go to $COLDOCC_RAW (default fermi_raw/cold_occulters). Typical run time with cached downloads: about 15 minutes on one core. Step 04 contains regression checks (assertions) of the light-curve load path: it stops if an occultation injected into the raw fluxes of an I = 16 star is not recovered through the same quality mask as real data, or if the 1998 fade of the R CrB star Terz V 2637 is not present in its loaded light curve. """ import os import subprocess import sys import time HERE = os.path.dirname(os.path.abspath(__file__)) STEPS = [("01_download.py", ["--fresh"] if "--fresh" in sys.argv else []), ("02_signal.py", []), ("03_rates.py", []), ("04_ogle2_search.py", ["--quick"] if "--quick" in sys.argv else []), ("04b_catalogue_inclusion.py", []), ("05_catalogues.py", []), ("06_limits.py", [])] def main(): t0 = time.time() for script, args in STEPS: t1 = time.time() print(f"\n===== {script} {' '.join(args)} =====", flush=True) subprocess.run([sys.executable, os.path.join(HERE, script)] + args, cwd=HERE, check=True) print(f"===== {script} done in {time.time() - t1:.0f} s =====", flush=True) print(f"\nall steps done in {(time.time() - t0) / 60:.1f} min") if __name__ == "__main__": main()