redback.sed.BlackbodyWithSpectralFeatures
- class redback.sed.BlackbodyWithSpectralFeatures(temperature: ndarray, r_photosphere: ndarray, frequency: ndarray, luminosity_distance: float, time: ndarray, feature_list: list = None, evolution_mode: str = 'smooth', **kwargs: None)[source]
Bases:
object- __init__(temperature: ndarray, r_photosphere: ndarray, frequency: ndarray, luminosity_distance: float, time: ndarray, feature_list: list = None, evolution_mode: str = 'smooth', **kwargs: None) None[source]
Blackbody SED with time-evolving spectral features (absorption/emission lines).
Features are modeled as Gaussian profiles in wavelength that can evolve smoothly or sharply over time. Each feature is defined by its central wavelength, width, amplitude, and temporal evolution parameters.
- Parameters:
temperature – Effective temperature in Kelvin (array matching time)
r_photosphere – Photosphere radius in cm (array matching time)
frequency – Frequency array in Hz (source frame)
luminosity_distance – Luminosity distance in cm
time – Time array in seconds (source frame)
feature_list – List of spectral feature dictionaries. Each feature requires: - ‘t_start’: Start time in seconds - ‘t_end’: End time in seconds - ‘rest_wavelength’: Central wavelength in Angstroms - ‘sigma’: Gaussian width in Angstroms - ‘amplitude’: Fractional flux change (negative for absorption, positive for emission) For smooth mode, optionally include: - ‘t_rise’: Rise time in seconds (default: 2 days) - ‘t_fall’: Fall time in seconds (default: 5 days)
evolution_mode – Temporal evolution type: - ‘smooth’: Sigmoid transitions with configurable rise/fall times - ‘sharp’: Step function on/off transitions
kwargs – Additional keyword arguments (unused)
Examples
>>> # Simple absorption line >>> feature = { ... 't_start': 0, 't_end': 30*24*3600, ... 'rest_wavelength': 6355.0, 'sigma': 400.0, 'amplitude': -0.3 ... } >>> >>> # Smooth evolution with custom rise/fall >>> smooth_feature = { ... 't_start': 0, 't_end': 40*24*3600, ... 't_rise': 3*24*3600, 't_fall': 7*24*3600, ... 'rest_wavelength': 6355.0, 'sigma': 400.0, 'amplitude': -0.4 ... }
- __call__(**kwargs)
Call self as a function.
Methods
__init__(temperature, r_photosphere, ...[, ...])Blackbody SED with time-evolving spectral features (absorption/emission lines).
Calculate flux density including blackbody and spectral features
Attributes
reference