guess_from_peak

threadcount.models.guess_from_peak(y, x, negative=False)[source]

Estimate starting values from 1D peak data and return (height,center,sigma).

Parameters:
  • y (array-like) – y data

  • x (array-like) – x data

  • negative (bool, optional) – determines if peak height is positive or negative, by default False

Returns:

(height, center, sigma) – Estimates of 1 gaussian line parameters.

Return type:

(float, float, float)