Fit Functions

The following fit functions are implemented and can be used within PIGOR or the Measurement class. They can be found in fit_functions.py.

fit_functions.gauss(x, a, x0, sigma)

Gaussian function, used for fitting data.

Parameters:
  • x – parameter
  • a – amplitude
  • x0 – maximum
  • sigma – width
fit_functions.poly5(x, a5, a4, a3, a2, a1, a0)

Polynom 5th degree for fitting.

Parameters:
  • x – parameter
  • a5 – coeff
  • a4 – coeff
  • a3 – coeff
  • a2 – coeff
  • a1 – coeff
  • a0 – coeff
Returns:

function – polynomial 5th degree

Todo

Make generalized polynomial generator function.

fit_functions.register_fit_function(func, bounds=(-inf, inf))

This decorator registers a new fit function and writes an entry to fit_function_list.

fit_functions.sine(x, a, omega, phase, c)

Sine function for fitting data.

Parameters:
  • x – parameter
  • a – amplitude
  • omega – frequency
  • phase – phase
  • c – offset
fit_functions.sine_lin(x, a, omega, phase, c, b)

Sine function with linear term added for fitting data.

Parameters:
  • x – parameter
  • a – amplitude
  • omega – frequency
  • phase – phase
  • c – offset
  • b – slope