satlas.stats.fitting.chisquare_spectroscopic_fit

satlas.stats.fitting.chisquare_spectroscopic_fit(f, x, y, xerr=None, func=<ufunc 'sqrt'>, verbose=True, hessian=False, method='leastsq')[source]

Use the chisquare_fit function, automatically estimating the errors on the counts by the square root.

Parameters:
  • f (BaseModel) – Model object containing all the information about the fit; will be fitted to the given data.
  • x (array_like) – Experimental data for the x-axis.
  • y (array_like) – Experimental data for the y-axis.
Other Parameters:
 
  • xerr (array_like, optional) – Error bars on x.
  • func (function, optional) – This function is applied to the model values to calculate the errorbars.
  • verbose (boolean, optional) – When set to True, a tqdm-progressbar in the terminal is maintained. Defaults to True.
  • hessian (boolean, optional) – When set to True, the SATLAS implementation of the Hessian uncertainty estimate is calculated, otherwise the LMFIT version is used. Defaults to False.
  • method (string, optional) – Sets the method to be used by lmfit for the fitting. See lmfit for all options.
Returns:

success, message – Boolean indicating the success of the convergence, and the message from the optimizer.

Return type:

tuple