#!/usr/bin/env python3 """Single entry point: regenerates every number, table and figure of the fp_kiii study. python3 code/run_all.py # full run (downloads are cached in $FP_KIII_RAW) python3 code/run_all.py --no-download Raw downloads go to fermi_raw/fp_kiii (override with FP_KIII_RAW); derived tables to data/, figures to figures/. Runtime: ~1 h for the first download (SDSS SkyServer, 90 SQL chunks), ~12 min after. Small look-ups made outside the download step are cached in the same place (CDS XMatch, Legacy Survey cut-outs, SIMBAD cluster positions, IRSA AllWISE aperture photometry of the ~60 far-tail galaxies). The only non-automatic inputs are code/vetting_manual.csv (visual classification of the ~60 most extreme outliers; used for the "vetted" limits only) and code/redside_manual.csv (visual notes on two very red objects; annotation only). report.md is written by hand from the tables in data/; data/report_numbers.txt collects every number it quotes. """ import sys import time import analysis_individual import analysis_regions import build_samples import download_data import finalize_limits import make_figures import region_checks import report_numbers import revision_checks import vet_candidates def main(): t0 = time.time() steps = [("download", download_data.main), ("build samples", build_samples.main), ("individual-galaxy analysis", analysis_individual.main), ("vetting data", vet_candidates.main), ("final limits", finalize_limits.main), ("region analysis", analysis_regions.main), ("region systematics checks", region_checks.main), ("revision checks (colour, mixtures, tails, clusters, WISE apertures, region scope)", revision_checks.main), ("figures", make_figures.main), ("digest of every number quoted in report.md (data/report_numbers.txt)", report_numbers.main)] for name, fn in steps: if name == "download" and "--no-download" in sys.argv: continue print("\n==== %s ====" % name, flush=True) fn() print("---- %s done, %.0f s elapsed" % (name, time.time() - t0), flush=True) if __name__ == "__main__": main()