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.
- regions
SpectralRegion
or list ofSpectralRegion
Region within the spectrum to calculate the gaussian sigma width. If regions is
None
, computation is performed over entire spectrum.- mask_interpolation
None
orLinearInterpolatedResampler
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:
- flux
Quantity
Flux in the provided spectrum (or regions). Unit isthe
spectrum
’s’flux
unit timesspectral_axis
unit.
- flux
Notes
While the flux can be computed on any spectrum or region, it should be continuum-subtracted to compute actual line fluxes.