guess_fwhm

sherpa.utils.guess_fwhm(y: ndarray, x: ndarray, xhi: ndarray | None = None, scale: float = 1000) ValueAndRange[source] [edit on github]

Estimate the value and valid range for the FWHM of the data.

Parameters:
y, xarray_like

The data points.

xhiNone or array_like, optional

If given then the x array is taken to be the low-edge of each bin.

scalenumber, optional

The scaling factor applied to the value to calculate the minimum (divide) and maximum (multiply) value for the FWHM range.

Returns:
ansdict

The keys are ‘val’, ‘min’, and ‘max’, which give the full-width half-maximum and its range.

See also

get_fwhm

Notes

If there are multiple peaks of the same height then the first peak is used.