redback.transient_models.spectral_models.blackbody_spectrum_with_p_cygni_lines

redback.transient_models.spectral_models.blackbody_spectrum_with_p_cygni_lines(angstroms, redshift, rph, temp, line_list, v_phot, **kwargs)[source]

Blackbody spectrum with multiple P-Cygni line profiles

Convenience function combining blackbody continuum with P-Cygni lines.

Parameters:
  • angstroms (array) – Wavelength array in angstroms in observer frame

  • redshift (float) – Source redshift

  • rph (float) – Photosphere radius in cm

  • temp (float) – Photosphere temperature in Kelvin

  • line_list (list of dict) – Each dict: {‘ion’: ‘Si II’, ‘lambda’: 6355, ‘tau’: 3.0}

  • v_phot (float) – Photospheric velocity in km/s

Returns:

flux – Flux in ergs/s/cm^2/angstrom

Return type:

array

Examples

>>> wave = np.linspace(3500, 8500, 2000)
>>> lines = [
...     {'ion': 'Si II', 'lambda': 6355, 'tau': 3.0},
...     {'ion': 'S II', 'lambda': 5640, 'tau': 2.0},
...     {'ion': 'Ca II', 'lambda': 3945, 'tau': 5.0}
... ]
>>> flux = blackbody_spectrum_with_p_cygni_lines(
...     wave, redshift=0.01, rph=1e15, temp=11000,
...     line_list=lines, v_phot=11000
... )