"""Shared paths and constants for the seti_meta study.""" import os import numpy as np HERE = os.path.dirname(os.path.abspath(__file__)) STUDY = os.path.dirname(HERE) DATA = os.path.join(STUDY, "data") FIGS = os.path.join(STUDY, "figures") RAW = os.environ.get("SETI_META_RAW", "fermi_raw/seti_meta") for _d in (DATA, FIGS, RAW, os.path.join(RAW, "vizier")): os.makedirs(_d, exist_ok=True) PC = 3.0856775814913673e16 # m FOURPI = 4.0 * np.pi # Reference powers (W) L_ARECIBO = 2.0e13 # Arecibo S-band planetary radar EIRP (Ekers et al. 2002; Sheikh et al. 2025) L_KI = 1.74e17 # Kardashev I: sunlight intercepted by Earth L_KII = 3.83e26 # Kardashev II: solar luminosity L_LTE = 4.0e9 # peak LTE mobile-tower leakage (Saide et al. 2023), ~20 MHz wide, NOT narrowband # EIRP grid used everywhere (W) LGRID = np.logspace(8.0, 28.5, 165) # 0.125 dex steps def eirp_min(d_pc, smin_wm2): """Minimum detectable isotropic power (W) at distance d (pc) for flux threshold smin (W/m^2).""" return FOURPI * (np.asarray(d_pc) * PC) ** 2 * smin_wm2 def dmax_pc(L, smin_wm2): """Maximum distance (pc) at which EIRP L (W) is above flux threshold smin (W/m^2).""" return np.sqrt(np.asarray(L) / (FOURPI * smin_wm2)) / PC