quickBayes.fitting.fit_utils

Functions

chi_squared(x_data, y_data, e_data, fit, params)

Method for calculating the reduced chi squared value :param x_data: x data to fit :param y_data: y data to fit :param e_data: error data for fit :param fit: the fit :param params: the fit parameters :return the chi squared value

derivative(x_data, params, func)

Get numerical derivative for a function :param x_data: the x data :param params: the paramaters :param func: the function :return numerical derivatives (with respect to fitting parameter)

fit_errors(x_data, params, fit, covar, df_by_dp)

Generate the errors for the fit line :param x_data: the x data :param params: the parameters for the function :param fit: the y data values from the fit :param covar: the covarience matrix :param df_by_dp: the derivatives :return the error values

log10_hessian_det(covar)

Calculate the log base 10 of the determinant of the Hessian matrix :param covar: the covarience matrix :return the log of the determinant of the Hessian matrix

param_errors(covar)

Get the errors for the parameters :param covar: the covarience matrix :return the errors for the parameters

res(func, x_data, y_data, e_data, param)

Calculate the residuals of the data: sum_i ((f(x_i) - y_i)/e_i)^2 :param func: the fitting function :param x_data: the x data :param y_data: the y data :param e_data: the e data :param params: the fitting parameters :return the residuals

var(func, x_data, y_data, params)

Calculate the variance of the data: sum_i (f(x_i) - y_i)^2 :param func: the fitting function :param x_data: the x data :param y_data: the y data :param params: the fitting parameters :return the variance