#!/usr/bin/env python3 """Re-run every number of ours on /metamorphic-novae/. Needs numpy and scipy. Run: python3 -I fetch_public_inputs.py python3 -I run_all.py Takes about 20 minutes. Each script reads the inputs as data. Afterwards it says which outputs match the copies hosted beside this script. """ import hashlib import os import subprocess import sys HERE = os.path.dirname(os.path.abspath(__file__)) OUTPUTS = [ "tess_summary.json", "tess_neighbour.json", "tess_followup.json", "tess_candidate.json", "tess_s89_amplitude_spectrum.csv", "review_tess.json", "tess_s89_spectrum_template.csv", "radius_curves.json", "base_rates.json", "extra_counts.json", "paper_checks.txt", "band_shares.json", "spectra_check.json", "figure_checks.json", "chart_data.json", ] def run(*args): print("running", args[0], flush=True) subprocess.run([sys.executable, "-I", os.path.join(HERE, args[0]), *args[1:]], check=True, stdout=subprocess.DEVNULL) def main(): inputs, out = (os.path.abspath(p) for p in sys.argv[1:3]) os.makedirs(out, exist_ok=True) tess = os.path.join(inputs, "tess") cone = os.path.join(inputs, "gaia-dr3", "cone-2arcmin.csv") src = os.path.join(inputs, "arxiv-2611.05297", "src") run("tess_period.py", tess, out) run("tess_neighbour.py", tess, cone, out) run("tess_followup.py", tess, out) run("tess_candidate.py", tess, cone, out) run("review_tess.py", tess, out) run("radius_curves.py", src, out) run("base_rates.py", inputs, out) run("extra_counts.py", inputs, out) run("paper_checks.py", out) run("band_shares.py", out) run("spectra_check.py", os.path.join(inputs, "aydi2023-data", "Gaia22alz.zip"), out) run("figure_checks.py", src, tess, out) run("chart_data.py", src, out) if out != HERE: for name in OUTPUTS: a, b = os.path.join(out, name), os.path.join(HERE, name) if os.path.exists(a) and os.path.exists(b): same = hashlib.sha256(open(a, "rb").read()).digest() == hashlib.sha256(open(b, "rb").read()).digest() print(("same as hosted: " if same else "differs from hosted: ") + name) if __name__ == "__main__": main()