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.


The spectrum object overwhich the equivalent width will be calculated.

regions: `~specutils.SpectralRegion` or list of `~specutils.SpectralRegion`

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

continuum1 or Quantity, optional

Value to assume is the continuum level. For the special value 1 (without units), 1 in whatever the units of the spectrum.flux will be assumed, otherwise units are required and must be the same as the spectrum.flux.


Equivalent width calculation, in the same units as the spectrum’s spectral_axis.


To do a standard equivalent width measurement, the spectrum should be continuum-normalized to whatever continuum is before this function is called.