redback.transient_models.spectral_models.p_cygni_profile
- redback.transient_models.spectral_models.p_cygni_profile(wavelength, lambda_rest, tau_sobolev, v_phot, continuum_flux, source_function='thermal', v_max=None, **kwargs)[source]
P-Cygni line profile using Sobolev approximation
Creates characteristic emission + blueshifted absorption from expanding envelope
- Parameters:
wavelength (array) – Wavelength array in Angstroms (observer frame)
lambda_rest (float) – Rest wavelength of transition in Angstroms (e.g., 6355 for Si II)
tau_sobolev (float) – Sobolev optical depth (0.1-100)
v_phot (float) – Photospheric velocity in km/s (5000-20000 for SNe)
continuum_flux (array or float) – Continuum flux level
source_function (str or float) – ‘thermal’ (Planckian), ‘scattering’ (electron scat), or float value
v_max (float, optional) – Maximum velocity of envelope in km/s (default: 1.5 * v_phot)
- Returns:
flux – Spectrum with P-Cygni profile
- Return type:
array
References
Kasen & Branch 2001 (ApJ, 560, 439) - Analytic inversion
Jeffery & Branch 1990 - P-Cygni atlas
Branch et al. 2002 (ApJ, 566, 1005) - Direct analysis of SN spectra
Notes
Sobolev approximation valid when: v_thermal << v_phot (typically 10 km/s << 10,000 km/s)
The profile consists of: - Blueshifted absorption trough (v < 0, |v| < v_max) - Emission peak (v > 0, near rest wavelength)
Examples
>>> # Si II 6355 line at 10,000 km/s >>> wave = np.linspace(5000, 7000, 1000) >>> flux = p_cygni_profile(wave, lambda_rest=6355, tau_sobolev=3.0, ... v_phot=10000, continuum_flux=1.0)