sheap.Profiles.profiles_lines_loglambda module

Log-Lambda Emission Line Profiles

This module defines a collection of emission-line profile functions evaluated in logarithmic wavelength space, ensuring velocity symmetry for Doppler-broadened spectral features.

All profiles accept a linear wavelength grid as input but internally operate in log(lambda) space via the transformation:

\[v = c \, \ln(\lambda / \lambda_0)\]

where \(\lambda_0\) is the rest-frame wavelength of the line and \(c\) is the speed of light.

The profiles defined here are intended for use in sheap spectral fitting pipelines where velocity-based parameterizations (FWHM, centroid shifts) are preferred over linear wavelength widths.

Available profiles

  • gaussian_fwhm_loglambda : Velocity-symmetric Gaussian profile.

  • lorentzian_fwhm_loglambda : Lorentzian (Cauchy) profile in velocity space.

  • skewed_gaussian_loglambda : Skew-normal Gaussian profile allowing asymmetric line shapes.

  • top_hat_loglambda : Boxcar (top-hat) profile in velocity space.

  • voigt_pseudo_loglambda : Pseudo-Voigt profile (Gaussian–Lorentzian mixture).

  • emg_fwhm_loglambda : Exponentially Modified Gaussian (EMG) profile.

All profiles share a common parameterization: - amplitude : Linear amplitude of the line. - vshift_kms : Velocity shift of the centroid [km/s]. - fwhm_v_kms : log10 of the velocity FWHM [km/s]. - lambda0 : Rest-frame wavelength of the line (fixed).

Some profiles include additional shape parameters (e.g. skewness, Lorentzian mixing fraction, or exponential decay scale).

Notes

  • Using log(lambda) ensures exact symmetry in velocity space and avoids wavelength-dependent distortions present in linear-lambda profiles.

  • These profiles are fully JAX-compatible and differentiable, enabling GPU-accelerated optimization and sampling.

  • Physical bounds and initial values for these profiles are handled by the corresponding constraint-building utilities in sheap.

Examples

import jax.numpy as jnp
from sheap.Profiles.loglambda_profiles import gaussian_fwhm_loglambda

x_lambda = jnp.linspace(6500.0, 6600.0, 2048)
params = [1.0, 0.0, 3.0, 6563.0]  # amp, vshift, log10(FWHM), lambda0

y = gaussian_fwhm_loglambda(x_lambda, params)
gaussian_fwhm_loglambda(x_lambda, params)[source]

Velocity-symmetric Gaussian in log(lambda) space.

Parameters:
  • x_lambda (jnp.ndarray) – Wavelength grid.

  • params ([amp, vshift_kms, fwhm_v_kms, lambda0]) – amp : Linear amplitude vshift_kms : Centroid velocity shift [km/s] fwhm_v_kms : log10(FWHM [km/s]) lambda0 : Rest wavelength of the line (required, fixed)

lorentzian_fwhm_loglambda(x_lambda, params)[source]

Lorentzian (Cauchy) profile evaluated in log(lambda) velocity space.

Parameters:
  • x_lambda (jnp.ndarray) – Wavelength grid (linear wavelength).

  • params ([amplitude, vshift_kms, fwhm_v_kms, lambda0]) – amplitude : Linear amplitude. vshift_kms : Velocity shift of the centroid [km/s]. fwhm_v_kms : log10(FWHM velocity width [km/s]). lambda0 : Rest-frame wavelength of the line.

skewed_gaussian_loglambda(x_lambda, params)[source]

Skewed Gaussian (skew-normal) profile evaluated in log(lambda) space.

Parameters:
  • x_lambda (jnp.ndarray) – Wavelength grid (linear wavelength).

  • params ([amplitude, vshift_kms, fwhm_v_kms, alpha, lambda0]) – amplitude : Linear amplitude. vshift_kms : Velocity shift of the centroid [km/s]. fwhm_v_kms : log10(FWHM velocity width [km/s]). alpha : Skewness parameter (positive = red skew). lambda0 : Rest-frame wavelength of the line.

top_hat_loglambda(x_lambda, params)[source]

Top-hat (boxcar) profile defined in log(lambda) velocity space.

Parameters:
  • x_lambda (jnp.ndarray) – Wavelength grid (linear wavelength).

  • params ([amplitude, vshift_kms, fwhm_v_kms, lambda0]) – amplitude : Linear amplitude. vshift_kms : Velocity shift of the centroid [km/s]. fwhm_v_kms : log10(FWHM velocity width [km/s]). lambda0 : Rest-frame wavelength of the line.

voigt_pseudo_loglambda(x_lambda, params)[source]

Pseudo-Voigt profile (Gaussian + Lorentzian mixture) evaluated in log(lambda) velocity space.

Parameters:
  • x_lambda (jnp.ndarray) – Wavelength grid (linear wavelength).

  • params ([amplitude, vshift_kms, fwhm_v_kms, eta, lambda0]) – amplitude : Linear amplitude. vshift_kms : Velocity shift of the centroid [km/s]. fwhm_v_kms : log10(FWHM velocity width [km/s]). eta : Mixing fraction (eta=1 Lorentzian, eta=0 Gaussian). lambda0 : Rest-frame wavelength of the line.

emg_fwhm_loglambda(x_lambda, params)[source]

Exponentially Modified Gaussian (EMG) profile evaluated in log(lambda) velocity space.

Parameters:
  • x_lambda (jnp.ndarray) – Wavelength grid (linear wavelength).

  • params ([amplitude, vshift_kms, fwhm_v_kms, tau_kms, lambda0]) – amplitude : Linear amplitude. vshift_kms : Velocity shift of the centroid [km/s]. fwhm_v_kms : log10(FWHM velocity width [km/s]). tau_kms : Exponential decay scale [km/s]. lambda0 : Rest-frame wavelength of the line.