lfast_etc.Source

class lfast_etc.Source(shape: object, mag: float, band: str = 'V', system: str = 'Vega', label: str = 'source', lines: list = <factory>, _scale: float = None)[source]

A point source with a known SED shape and a magnitude.

Build with the class methods blackbody(), flat(), powerlaw() or from_arrays(), then optionally add Gaussian spectral lines with add_line().

__init__(shape: object, mag: float, band: str = 'V', system: str = 'Vega', label: str = 'source', lines: list = <factory>, _scale: float = None) → None

Methods

__init__(shape, mag, band, system, label, ...)

add_line(center_nm, depth, sigma_nm)

Add a Gaussian line.

blackbody(teff, mag[, band, system])

Blackbody of temperature teff [K].

describe()

flat(mag[, band, system, kind])

Flat spectrum: constant F_nu (kind="fnu") or F_lambda.

flux(wavelength_nm[, delta_lambda_nm])

F_lambda at Earth [W m^-2 nm^-1], lines included (bin-averaged if delta_lambda_nm is given).

from_arrays(wavelength_nm, flux[, ...])

User spectrum.

line_factor(wavelength_nm[, delta_lambda_nm])

Multiplicative line profile.

magnitude(band[, system])

Synthetic magnitude of this source in another box band.

photon_flux(wavelength_nm[, delta_lambda_nm])

Photon flux density [photons s^-1 m^-2 nm^-1].

plot([wavelength_nm, ax, photon])

Plot the SED with the normalising band shaded (see lfast_etc.plotting.plot_source()).

powerlaw(alpha, mag[, band, system])

Power law F_nu ~ nu^alpha (so F_lambda ~ lambda^(-alpha-2)).

with_mag(mag)

Copy of this source at another magnitude (same band/system/lines).

Attributes

band

label

system

shape

mag

lines