integrate_spectrum_trapz#
- aesop.integrate_spectrum_trapz(spectrum, center_wavelength, width, weighting=False, plot=False)[source]#
Integrate the area under a spectrum.
- Parameters:
- spectrum
EchelleSpectrum
Spectrum to integrate under
- center_wavelength
Quantity
Center of region to integrate
- width
Quantity
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
- spectrum
- Returns:
- integralfloat
Integral under the spectrum
- errorfloat
Square-root of the sum of the fluxes within the bounds of the integral