scisalt.scipy.GaussResults

class scisalt.scipy.GaussResults(x, y, sigma_y=None, p0=None, variance=False, background=False)[source]

Fits a gaussian to a curve specified by pairs x and y, with error on y of sigma_y.

  • plot: Determines whether the plot is shown
  • p0: Initial guess given by amplitude amp, mean mu, and standard deviation rms, in the form of:
    • [amp, mu, rms**2] if variance_bool is true
    • [amp, mu, rms] if variance_bool is false
  • background_bool: If true, uses a background term in the fit, with initial guess bg

Returns full statistical results in the form of an instance of class GaussResults.

Attributes

background
chisq_red The reduced chi square.
func
p0
pcov The covariance for the fit parameters.
popt The fit parameters for the fit function.
sigma_y
use_error
variance
x
y

Methods

plot()