API reference#

Core module summary#

Fitter()

Main class for performing fits and organising data

Source(x, y, yerr, name[, xerr])

Initializes a source of data

Model(name[, prefunc])

Base Model class

Models module summary#

ExponentialDecay(a, tau[, name, prefunc])

Model for an exponential decay

Polynomial(p[, name, prefunc])

Model class for a polynomial response

SkewedVoigt(A, mu, FWHMG, FWHML, skew[, ...])

Model for a skewed Voigt peak by the error function.

PiecewiseConstant(values, bounds[, name, ...])

Model class for a PiecewiseConstant response

Voigt(A, mu, FWHMG, FWHML[, name, prefunc])

Model for a Voigt lineshape

HFS(I, J[, A, B, C, df, fwhmg, fwhml, name, ...])

Initializes a hyperfine spectrum Model with the given hyperfine parameters.

Interface module summary#

HFSModel(I, J, ABC[, centroid, fwhm, scale, ...])

Initializes a hyperfine spectrum Model with the given hyperfine parameters.

SumModel(models, background_params[, name, ...])

Initializes a hyperfine spectrum for the sum of multiple Models with the given models and a step background.

chisquare_fit(model, x, y, yerr[, xerr, method])

Perform a fit of the provided model to the data provided in this function.

Plotting module summary#

generateCorrelationPlot(filename[, filter, ...])

Given the random walk data, creates a triangle plot: distribution of a single parameter on the diagonal axes, 2D contour plots with 1, 2 and 3 sigma contours on the off-diagonal.

generateWalkPlot(filename[, filter, burnin, ...])

Given the random walk data, the random walk for the selected parameters is plotted.

Utilities module summary#

generateSpectrum(models, x[, generator])

Generates a dataset based on the models and x-values provided.

poissonInterval(data[, sigma, alpha, mean])

Calculates the confidence interval for the mean of a Poisson distribution.

weightedAverage(x, sigma[, axis])

Takes the weighted average of an array of values and the associated errors.

Subpages#