line_flux

specutils.analysis.line_flux(spectrum, regions=None, mask_interpolation=<class 'specutils.manipulation.resample.LinearInterpolatedResampler'>)[source]

Computes the integrated flux in a spectrum or region of a spectrum.

Applies to the whole spectrum by default, but can be limited to a specific feature (like a spectral line) if a region is given.

Parameters:
spectrumSpectrum1D

The spectrum object over which the summed flux will be calculated.

regionsSpectralRegion or list of SpectralRegion

Region within the spectrum to calculate the gaussian sigma width. If regions is None, computation is performed over entire spectrum.

mask_interpolationNone or LinearInterpolatedResampler

Interpolator class used to fill up the gaps in the spectrum’s flux array, when the spectrum mask is not None. If set to None, the masked spectral bins are excised from the data without interpolation and the bin edges of the adjacent bins are extended to fill the gap.

Returns:
fluxQuantity

Flux in the provided spectrum (or regions). Unit isthe spectrum’s’ flux unit times spectral_axis unit.

Notes

While the flux can be computed on any spectrum or region, it should be continuum-subtracted to compute actual line fluxes.