sheap.SheaProducts.Utils.MasterCombineProfile module
Master combine Profile
#TODO cleaning
- combine_fast(params_broad, params_narrow, limit_velocity=150.0, C_KMS=299792.458)
Efficiently combine multiple broad components with one narrow component into an effective line measurement.
- Parameters:
params_broad (ndarray, shape (N, 3*n_broad)) – Broad component parameters grouped as [amp_i, mu_i, fwhm_i, …].
params_narrow (ndarray, shape (N, 3)) – Narrow component parameters [amp_n, mu_n, fwhm_n]. Only
mu_nis used in velocity filtering.limit_velocity (float, optional) – Velocity threshold in km/s for virial filtering. Default 150.
C_KMS (float, optional) – Speed of light in km/s. Default 299792.
- Returns:
fwhm_final (ndarray, shape (N,)) – Effective full width at half maximum (same units as input).
amp_final (ndarray, shape (N,)) – Effective amplitude.
mu_final (ndarray, shape (N,)) – Effective line center.
- Return type:
tuple[jax.numpy.ndarray, jax.numpy.ndarray, jax.numpy.ndarray]
Notes
Virial filtering selects the nearest broad component relative to the narrow component if offsets exceed
limit_velocity.Otherwise, amplitude-weighted averages of broad components are used.