specutils.analysis.fwhm(spectrum, regions=None)[source]

Compute the true full width half max of the spectrum.

This makes no assumptions about the shape of the spectrum (e.g. whether it is Gaussian). It finds the maximum of the spectrum, and then locates the point closest to half max on either side of the maximum, and measures the distance between them. This will be calculated over the regions, if they are specified.


The spectrum object over which the width will be calculated.

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

Region within the spectrum to calculate the FWHM value. If regions is None, computation is performed over entire spectrum.

whmQuantity or list (based on region input)

Full width of the signal at half max


The spectrum should be continuum subtracted before being passed to this function.