zeus21.SED ========== .. py:module:: zeus21.SED .. autoapi-nested-parse:: SEDs and Green's functions for first-galaxy emission models. Authors: zeus21 v2 collaboration - June 2026 Emily Bregou ; Hector Afonso G. Cruz ; Sarah Libanore ; Julian B. Muñoz ; Yonny Sklansky ; Emilie Thélie ; Alessandra Venditti arXiv:2302.08506, arXiv:2306.09403, arXiv:2407.18294, Sklansky et al. (in prep) Functions --------- .. autoapisummary:: zeus21.SED.SED_XRAY zeus21.SED.SED_LyA zeus21.SED.Greens_function_LUV zeus21.SED.Selection_Timescales_LUV zeus21.SED.Greens_function_LUV_Short zeus21.SED.Greens_function_LUV_Long zeus21.SED.Greens_function_LHa Module Contents --------------- .. py:function:: SED_XRAY(AstroParams, En, pop=0) X-ray SED for Pop II or Pop III sources. Normalized so that ∫_{E0}^{Emax} E · SED(E) dE = 1, i.e. E·SED is a power law with index alpha_xray. The function returns the *photon number* spectrum (divided by E at the end). The high-energy cutoff is intentionally omitted because photons redshift down into the <2 keV observing band. :param AstroParams: Must expose: alpha_xray, alpha_xray_III, E0_xray, Emax_xray_norm. :type AstroParams: object :param En: Photon energy in eV. :type En: float or array-like :param pop: Stellar population. 2 = Pop II, 3 = Pop III. :type pop: {2, 3} :returns: SED in units of eV⁻¹, same shape as En. Zero below E0_xray. :rtype: ndarray .. py:function:: SED_LyA(nu_in, pop=0) Lyman-alpha continuum SED for Pop II or Pop III sources. A two-segment power law in frequency, joined at ν_LyB: • νLyA ≤ ν < νLyB : index indexbelow (flatter) • νLyB ≤ ν < νLyCont: index indexabove (steeper) Normalized so that ∫_{νLyA}^{νLyCont} SED(ν) dν = 1 (photon number per unit frequency). Contrast with SED_XRAY, which normalizes E·SED. :param nu_in: Frequency in the same units as constants.freqLyA / freqLyCont. :type nu_in: float or array-like :param pop: Stellar population. Uses BL05 stellar spectra as reference. Pop II: amps = [0.68, 0.32], Pop III: amps = [0.56, 0.44]. :type pop: {2, 3} :returns: SED value(s), same shape as nu_in. Zero outside [νLyA, νLyCont). :rtype: ndarray .. py:function:: Greens_function_LUV(AstroParams, ageMyrin, Mhalos) UV luminosity Green's function for a 1 M☉/yr instantaneous burst at some time t. Convolve with SFR(t) to get L_UV(t): L_UV(t) = ∫ G_UV(t - t') · SFR(t') dt' The shape is a double-power-law in age (fast rise, slow decline) with a Gaussian bump at very young ages (~2–4 Myr) capturing the brief Wolf-Rayet and OB-supergiant phase. A Gaussian exponential cutoff suppresses contributions beyond ~650–1100 Myr depending on the SED model. :param AstroParams: Must choose SEDMODEL ∈ {'bagpipes', 'BPASS', 'BPASS_binaries'}. :type AstroParams: object :param ageMyrin: Stellar population age in Myr. A small offset (1e-4 Myr) is added internally to avoid division by zero at age = 0. :type ageMyrin: float or array-like, shape (Nt,) :param Mhalos: Halo masses in M☉. Currently enter only through IMFZcorrection, which is unity for UV (correction absorbed into ε*). :type Mhalos: array-like, shape (NMh,) :returns: Green's function in erg s⁻¹ M☉⁻¹. :rtype: ndarray, shape (NMh, Nt) .. py:function:: Selection_Timescales_LUV(times, time1, time2) Returns the selection function from t1 to t2, to keep t1 < t < t2 smoothly .. py:function:: Greens_function_LUV_Short(AstroParams, time, mass) Age in Myr, window in erg/s/Msun for the short timescale LUV window .. py:function:: Greens_function_LUV_Long(AstroParams, time, mass) Age in Myr, window in erg/s/Msun for the long timescale LUV window .. py:function:: Greens_function_LHa(AstroParams, ageMyrin, Mhalos) Hα luminosity Green's function for a 1 M☉/yr instantaneous burst at some past time t. Analogous to Greens_function_LUV but for the Hα recombination line. Hα traces ionizing photons and therefore falls off much faster with age (~few Myr vs. ~Gyr for UV). For BPASS_binaries there is a second component at ~20 Myr to account for delayed ionizing flux. The IMF/metallicity correction scales with halo mass as a power law, clamped to [0.1, 10] to prevent runaway corrections. :param AstroParams: Must expose: SEDMODEL, normLHa_ZIMF, alphanormLHa_ZIMF. :type AstroParams: object :param ageMyrin: Stellar population age in Myr. :type ageMyrin: float or array-like, shape (Nt,) :param Mhalos: Halo masses in M☉. Used in the IMF/Z mass-dependent correction. :type Mhalos: array-like, shape (NMh,) :returns: Green's function in erg s⁻¹ M☉⁻¹. :rtype: ndarray, shape (NMh, Nt)