"""Single entry point of the dyson100 study: regenerates every number, table and figure. python3 code/run_all.py # everything (downloads are cached and skipped if present) python3 code/run_all.py --from 3 # restart at step 3 Raw downloads (about 0.6 GB: GCNS, AllWISE cone matches for 331,312 stars and as many control positions, the SFD dust map, WISE response curves, catalogue cross-matches, ~3,600 image cutouts) go to $DYSON100_RAW (default fermi_raw/dyson100). From an empty cache the downloads take roughly an hour (network bound); with the cache the analysis runs single-threaded in about a quarter of an hour. The only non-generated input is data/visual_vetting.csv (six manual image classifications, see the report); deleting it changes the 'unexplained' count from 37 to 43 (robustness.csv). Revision after refereeing: the limits are given in three versions (every excess counted, which uses no identification and is the headline; unexplained plus catalogue-only identifications; unexplained only), with ranges over temperature and tolerance, per spectral class and per M-dwarf sub-range (09_limits.py); the chance-alignment expectation has a second, direct-count estimator (05_control.py); see the report's "Response to referee". Python >= 3.10 with numpy, scipy, pandas, matplotlib, astropy. No other packages. """ import os import subprocess import sys import time HERE = os.path.dirname(os.path.abspath(__file__)) STEPS = [ ("01_download.py", "GCNS, Mamajek dwarf table, AllWISE around every star and control position"), ("02_build_sample.py", "main-sequence parent sample within 100 pc, AllWISE match, dust"), ("03_excess.py", "photosphere calibration, W3/W4 excess significance, quality flags"), ("04_injection.py", "injection-recovery of swarms: completeness C(f, T)"), ("05_control.py", "expected chance alignments from blank-sky control positions"), ("06_vet_queries.py", "SIMBAD / CDS XMatch queries for excess and comparison stars"), ("07_images.py", "AllWISE image cutouts: is the W3/W4 light on the star?"), ("08_classify.py", "explanation class for every excess star"), ("09_limits.py", "upper limits, settled fractions, accounting"), ("10_robustness.py", "robustness variants and recall of published discs"), ("11_figures.py", "figures and slim per-star table"), ] def main(): start = 1 if "--from" in sys.argv: start = int(sys.argv[sys.argv.index("--from") + 1]) env = dict(os.environ, PYTHONWARNINGS="ignore") for i, (script, what) in enumerate(STEPS, 1): if i < start: continue t0 = time.time() print(f"\n===== step {i:02d}: {script} - {what}", flush=True) args = [sys.executable, os.path.join(HERE, script)] if script == "07_images.py": args.append("--no-sheets") r = subprocess.run(args, env=env, cwd=os.path.expanduser("~")) if r.returncode != 0: sys.exit(f"step {script} failed with exit code {r.returncode}") print(f"===== step {i:02d} done in {time.time() - t0:.0f} s", flush=True) print("\nall steps done") if __name__ == "__main__": main()