exa.core.util.model_functions.get_gaussian_fitter

exa.core.util.model_functions.get_gaussian_fitter#

get_gaussian_fitter(x0_estimate=None, sigma_estimate=None, y0_estimate=None, A_estimate=None, b_estimate=None, **fit_kwargs)#

Generate fitting function for a Gaussian curve (with optional linear slope b).

This will try to generate sensible guesses based on the data (x, y).

Parameters:
  • x0_estimate (float | None) – optional estimate for the center of the Gaussian

  • sigma_estimate (float | None) – optional estimate for the standard deviation of the Gaussian

  • y0_estimate (float | None) – optional estimate for the y-axis offset

  • A_estimate (float | None) – optional estimate for the height of the curve

  • b_estimate (float | None) – optional estimate for the linear slope added to the Gaussian. If not given, the model will be used without a linear slope instead of generating a default estimate.

  • fit_kwargs – Additional arguments for the curve fit function.

Returns:

function for fitting data to a gaussian model