jwspecfit.lyman_alpha

Lyman-alpha fitting: skewed Gaussian profile × IGM absorption.

Uses Inoue et al. (2014) prescription for IGM transmission along the line of sight, applied to a skewed Gaussian emission profile to capture the characteristic asymmetry of Lyα.

Functions

igm_transmission(wave_obs_A, z_source)

Mean IGM transmission using Inoue et al. (2014).

lya_model(lam_left_A, lam_right_A, z, ...)

Lyman-alpha emission model: skewed Gaussian × IGM transmission.

skewed_gaussian_binned(lam_left_A, ...)

Bin-averaged skewed Gaussian profile.

jwspecfit.lyman_alpha.igm_transmission(wave_obs_A, z_source)[source]

Mean IGM transmission using Inoue et al. (2014).

Computes the average transmission through the intergalactic medium for photons observed at wave_obs_A from a source at z_source, accounting for Lyman-series line absorption (LAF) and damped Lyman-alpha systems (DLA).

Parameters:
  • wave_obs_A (np.ndarray) – Observed wavelength in Angstroms.

  • z_source (float) – Source redshift.

Returns:

Transmission T(λ) ∈ [0, 1] at each wavelength.

Return type:

np.ndarray

jwspecfit.lyman_alpha.lya_model(lam_left_A, lam_right_A, z, amplitude, mu_A, sigma_A, skew)[source]

Lyman-alpha emission model: skewed Gaussian × IGM transmission.

Parameters:
  • lam_left_A (np.ndarray) – Bin edges (Å).

  • lam_right_A (np.ndarray) – Bin edges (Å).

  • z (float) – Source redshift.

  • amplitude (float) – Integrated Lyα flux (before IGM absorption).

  • mu_A (float) – Observed Lyα centroid (Å).

  • sigma_A (float) – Observed Lyα width (Å).

  • skew (float) – Skewness parameter (positive = red-asymmetric, typical for Lyα).

Returns:

Model flux density in each bin (Å⁻¹ × flux units).

Return type:

np.ndarray

jwspecfit.lyman_alpha.skewed_gaussian_binned(lam_left_A, lam_right_A, amplitude, mu_A, sigma_A, skew)[source]

Bin-averaged skewed Gaussian profile.

Uses scipy.stats.skewnorm evaluated at bin centres, then normalised to unit area. The amplitude parameter gives the integrated flux.

Parameters:
  • lam_left_A (np.ndarray) – Bin edges (Å).

  • lam_right_A (np.ndarray) – Bin edges (Å).

  • amplitude (float) – Integrated flux (same units as flux × Å).

  • mu_A (float) – Location parameter (Å).

  • sigma_A (float) – Scale parameter (Å).

  • skew (float) – Skewness parameter (0 = symmetric, positive = red tail).

Returns:

Profile value in each bin (flux density, Å⁻¹ × amplitude units).

Return type:

np.ndarray