fitting — Advanced fitting#

Module documentation#

Advanced fitting facilities.

hexsample.fitting.fit_gaussian_iterative(histogram, p0=None, xmin=-inf, xmax=inf, absolute_sigma=True, num_sigma_left=2.0, num_sigma_right=2.0, num_iterations=2, **kwargs)[source]#

Fit the core of a gaussian histogram within a given number of sigma around the peak.

This function performs a first round of fit to the data and then repeats the fit iteratively limiting the fit range to a specified interval defined in terms of deviations (in sigma) around the peak.

For additional parameters look at the documentation of the ixpeobssim.core.fitting.fit_histogram()

Parameters#

num_sigma_leftfloat

The number of sigma on the left of the peak to be used to define the fitting range.

num_sigma_rightfloat

The number of sigma on the right of the peak to be used to define the fitting range.

num_iterationsint

The number of iterations of the fit.