sheap.Profiles.Combine module

Log-Lambda Profile Combination Utilities

This module defines utilities for combining multiple emission-line components evaluated in logarithmic wavelength space, using velocity-based parameterizations.

It provides:

  • PROFILE_LINE_FUNC_MAP_loglambda : A registry mapping canonical profile names (e.g. "gaussian", "lorentzian", "skewed_gaussian") to their corresponding log-lambda profile functions.

  • SPAF_loglambda : A SPAF (Sum Profiles Amplitude Free) constructor for log-lambda profiles, enabling physically motivated combinations of multiple emission lines with shared kinematic parameters.

The profiles referenced here operate internally in log(lambda) space via the transformation:

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

ensuring exact symmetry in velocity space for Doppler-broadened features.

SPAF allows multiple lines to: - Share kinematic parameters (velocity shift, FWHM, and shape parameters) - Enforce fixed or semi-fixed amplitude ratios (e.g. doublets, multiplets) - Be modeled with a reduced number of free parameters

Notes

  • Only profiles registered in PROFILE_LINE_FUNC_MAP_loglambda can be combined using SPAF_loglambda.

  • Base profiles must be decorated with @with_param_names and include at least "amplitude" and "lambda0" in their parameter list.

  • Physical bounds and initial values for the combined parameters are handled by the constraint-building utilities elsewhere in sheap.

Examples

from sheap.Profiles.combine import SPAF_loglambda

# Hα + [NII] doublet with fixed 3:1 ratio
centers = [6548.05, 6583.45]
rules = [(0, 1.0, 0), (1, 3.0, 0)]

G = SPAF_loglambda(
    centers=centers,
    amplitude_rules=rules,
    profile_name="gaussian",
)

# params = [amplitude0, vshift_kms, fwhm_v_kms]
y = G(x_lambda, params)
SPAF_loglambda(centers, amplitude_rules, profile_name)[source]

SPAF (Sum Profiles Amplitude Free) wrapper for log-lambda line profiles.

Parameters:
  • centers (list[float])

  • amplitude_rules (list[tuple[int, float, int]])

  • profile_name (str)