guess_fwhm

sherpa.utils.guess.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 (array_like) – The data points.

  • x (array_like) – The data points.

  • xhi (None or array_like, optional) – If given then the x array is taken to be the low-edge of each bin.

  • scale (number, optional) – The scaling factor applied to the value to calculate the minimum (divide) and maximum (multiply) value for the FWHM range.

Returns:

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

Return type:

dict

See also

get_fwhm

Notes

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