trident.absorption_spectrum.absorption_spectrum.AbsorptionSpectrum

class trident.absorption_spectrum.absorption_spectrum.AbsorptionSpectrum(lambda_min, lambda_max, n_lambda)[source]

Base class for generating absorption spectra. This code was originally based in yt and more restrictive in terms of what development was allowed, so the SpectrumGenerator subclass has more advanced functionality built on top of this. The base algorithm and functionality for spectral generation occurs here though.

Note

The preferred method for generating spectra is using SpectrumGenerator.

Parameters

Lambda_min:

float

lower wavelength bound in angstroms.

Lambda_max:

float

upper wavelength bound in angstroms.

N_lambda:

int

number of wavelength bins.

Methods

__init__ Initialize self.
add_continuum Add a continuum feature that follows a power-law.
add_line Add an absorption line to the list of lines included in the spectrum.
error_func Approximate the flux error for a spectrum.
make_spectrum Make spectrum from ray data using the line list.