fwhm

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.

Parameters:
spectrumSpectrum1D

The spectrum object over which the width will be calculated.

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

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

Returns:
whmQuantity or list (based on region input)

Full width of the signal at half max

Notes

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