integrate_spectrum_trapz#

aesop.integrate_spectrum_trapz(spectrum, center_wavelength, width, weighting=False, plot=False)[source]#

Integrate the area under a spectrum.

Parameters:
spectrumEchelleSpectrum

Spectrum to integrate under

center_wavelengthQuantity

Center of region to integrate

widthQuantity

Width about the center to integrate

wavelength_offsetfloat

Offset wavelengths by this amount, which is useful if a wavelength solution refinement as been made.

weightingbool

Apply a triangular weighting function to the fluxes

Returns:
integralfloat

Integral under the spectrum

errorfloat

Square-root of the sum of the fluxes within the bounds of the integral