redback.sed.Line

class redback.sed.Line(time: ndarray, luminosity: ndarray, frequency: ndarray | float, sed: _SED | Blackbody, luminosity_distance: float, line_wavelength: float = 7500.0, line_width: float = 500, line_time: float = 50, line_duration: float = 25, line_amplitude: float = 0.3, **kwargs)[source]

Bases: _SED

A class that modifies an input SED by incorporating a time‐dependent absorption line feature.

Reference:

https://ui.adsabs.harvard.edu/abs/2018ApJS..236….6G/abstract

__init__(time: ndarray, luminosity: ndarray, frequency: ndarray | float, sed: _SED | Blackbody, luminosity_distance: float, line_wavelength: float = 7500.0, line_width: float = 500, line_time: float = 50, line_duration: float = 25, line_amplitude: float = 0.3, **kwargs) None[source]

Modifies the input SED by imposing a time-dependent absorption line.

Parameters:
  • time (np.ndarray) – 1D array of times (in source frame).

  • luminosity (np.ndarray) – 1D array of luminosities (in cgs units) corresponding to each time.

  • frequency (Union[np.ndarray, float]) – Frequency (in Hz, source frame) at which to calculate the flux. If an array is provided, its shape must be broadcastable with time.

  • sed (Union[_SED, Blackbody]) – An instantiated SED object (e.g. a CutoffBlackbody).

  • luminosity_distance (float) – Luminosity distance in cm.

  • line_wavelength (float, optional) – Central wavelength of the line in angstrom (default 7500 Å).

  • line_width (float, optional) – Line width (sigma) in angstrom (default 500 Å).

  • line_time (float, optional) – The time when the line is strongest (default 50).

  • line_duration (float, optional) – The characteristic duration of the line (default 25).

  • line_amplitude (float, optional) – The maximum amplitude of the line absorption (default 0.3).

  • kwargs (dict, optional) – Other keyword arguments.

__call__(**kwargs)

Call self as a function.

Methods

__init__(time, luminosity, frequency, sed, ...)

Modifies the input SED by imposing a time-dependent absorption line.

calculate_flux_density()

Compute the modified SED with the absorption line and store the result internally.

Attributes

UNITS

flux_density

Returns the computed flux density; this property wraps an internal attribute.

reference

wavelength

Returns the wavelength corresponding to self.frequency (using nu_to_lambda), while preserving broadcasting.

calculate_flux_density()[source]

Compute the modified SED with the absorption line and store the result internally.

property flux_density

Returns the computed flux density; this property wraps an internal attribute.

property wavelength

Returns the wavelength corresponding to self.frequency (using nu_to_lambda), while preserving broadcasting.