astrocook.mocks.populations module#

Random populations of absorbers for mocks.

The default parameters are standard functional forms with indicative values, to be calibrated against the literature before scientific use:

  • Lyman-alpha forest: column densities from f(N) ~ N^-beta (beta = 1.5), Doppler parameters log-normal around 25 km/s, line density dN/dz = A ((1 + z) / 4)^gamma. The default A = 1700 (12 < logN < 17, gamma = 2.5) gives a mean transmission within ~0.03 of exp(-tau_eff), tau_eff = 0.0018 (1 + z)^3.92 (Faucher-Giguere et al. 2008), at z = 3 and 3.8.

  • Metal systems: a few components within a small velocity range, optionally with an H I component at the system redshift.

  • Strong H I absorbers (Lyman-limit systems, sub-DLAs, DLAs): column densities from f(N) ~ N^-beta (beta = 1.7) within a range, uniform Doppler parameters, uniform redshifts, all the Lyman lines of the atomic data table (LYMAN_SERIES). Combine with MockTruth(lyman_limit=True) for the absorption below the Lyman limit.

astrocook.mocks.populations.LLS_LOGN = (17.2, 19.0)#

Column density ranges (log10 cm^-2) of the strong H I absorbers

astrocook.mocks.populations.expected_forest_lines(z_min: float, z_max: float, dndz_at_3: float = 1700.0, gamma: float = 2.5) → float[source]#

Expected number of forest lines between z_min and z_max.

astrocook.mocks.populations.mean_transmission_fg08(z: float) → float[source]#

Mean Lyman-alpha forest transmission, exp(-0.0018 (1 + z)^3.92).

astrocook.mocks.populations.lya_forest(rng: Generator, z_min: float, z_max: float, logN_range: Tuple[float, float] = (12.0, 17.0), beta: float = 1.5, b_median: float = 25.0, b_sigma_dex: float = 0.15, b_min: float = 10.0, dndz_at_3: float = 1700.0, gamma: float = 2.5, series: str = 'Ly_a', strong_series: str | None = None, strong_logN: float = 15.0) → List[MockComponent][source]#

Random Lyman-alpha forest between z_min and z_max.

The number of lines is Poisson-distributed around expected_forest_lines(); dndz_at_3 is the line density at z = 3 for column densities in logN_range. series is the series of every line: 'Ly_a' (the default), 'Ly_ab', or LYMAN_SERIES for the whole series. With strong_series the lines with logN >= strong_logN get that series instead, e.g. the whole Lyman series only where the higher lines matter (a few percent of the lines with the defaults, so the mock stays fast); the draws are the same.

astrocook.mocks.populations.metal_systems(rng: Generator, n_systems: int, z_min: float, z_max: float, species: Sequence[str] = ('CIV', 'SiIV', 'MgII'), max_components: int = 4, dv_kms: float = 50.0, logN_range: Tuple[float, float] = (12.0, 14.5), b_range: Tuple[float, float] = (4.0, 15.0), hi_logN_range: Tuple[float, float] | None = None, hi_b_range: Tuple[float, float] = (15.0, 35.0)) → List[MockComponent][source]#

Random metal systems, each with 1 to max_components components of one species, spread within +/- dv_kms of the system redshift.

With hi_logN_range each system also has one H I component (all the Lyman lines) at the system redshift, with logN uniform in that range and b uniform in hi_b_range; without it the systems are the same as before the option existed (same random draws).

astrocook.mocks.populations.strong_hi_systems(rng: Generator, n_systems: int, z_min: float, z_max: float, logN_range: Tuple[float, float] = (20.3, 22.0), beta: float = 1.7, b_range: Tuple[float, float] = (15.0, 35.0)) → List[MockComponent][source]#

Random strong H I absorbers, one component each, with all the Lyman lines: Lyman-limit systems, sub-DLAs or DLAs depending on logN_range (LLS_LOGN, SUBDLA_LOGN, DLA_LOGN).