equivalent_width¶
-
specutils.analysis.equivalent_width(spectrum, continuum=1, regions=None)[source]¶ Computes the equivalent width of a region of the 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: spectrum : Spectrum1D
The spectrum object overwhich the equivalent width will be calculated.
regions: `~specutils.utils.SpectralRegion` or list of `~specutils.utils.SpectralRegion`
Region within the spectrum to calculate the gaussian sigma width. If regions is
None, computation is performed over entire spectrum.continuum :
1orQuantity, optionalValue to assume is the continuum level. For the special value
1(without units),1in whatever the units of thespectrum.fluxwill be assumed, otherwise units are required and must be the same as thespectrum.flux.Returns: ew :
QuantityEquivalent width calculation, in the same units as the
spectrum’sspectral_axis.Notes
To do a standard equivalent width measurement, the
spectrumshould be continuum-normalized to whatevercontinuumis before this function is called.