cwitools.modeling

Tools for modeling, fitting, and model comparison

Functions

aic(model, data, k) Calculate the Akaike Information Criterion for a model.
bic(model, data, k) Calculate the Bayesian Information Criterion for a model.
bic_weights(bic_list) Get weights representing relative likelihood of models based on BICs.
fit_de(model_func, model_bounds, xdata, ydata) Generic wrapper for fitting a model using SciPy’s differential evolution.
fwhm2sigma(fwhm) Convert Gaussian FWHM (Full-Width at Half Maximum) to standard deviation.
gauss1d(params, x) Simple wrapper for a one-dimensional Gaussian.
moffat1d(params, x) Simple wrapper for a one-dimensional Moffat profile.
rss(data, model) Get the residual sum of squares for a model and data.
rss_func(model_params, x, y, model_func) Generic wrapper to get residual sum of squares for a model/data.
sigma2fwhm(sigma) Convert standard deviation to FWHM (Full-Width at Half Maximum).