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 :
1
orQuantity
, optionalValue to assume is the continuum level. For the special value
1
(without units),1
in whatever the units of thespectrum.flux
will be assumed, otherwise units are required and must be the same as thespectrum.flux
.Returns: ew :
Quantity
Equivalent width calculation, in the same units as the
spectrum
’sspectral_axis
.Notes
To do a standard equivalent width measurement, the
spectrum
should be continuum-normalized to whatevercontinuum
is before this function is called.