sdapy.model_fitters.fit_model¶
- class sdapy.model_fitters.fit_model(x_data, y_data, yerr_data, filters=None)¶
Fits data with analytic models.
- Parameters
- x_dataarray
Independent values, e.g. (rest frame) phase relative to peak
- y_dataarray
Dependent values, e.g. fluxes
- yerr_dataarray, int
Dependent value errors, e.g. flux errors
- filtersarray
If filters available, will fit for each band simultaneously.
Methods
continue_chains(t_data, f_data, f_unc_data, ...)Run MCMC for longer than initial fit
filter_samples(samples, lnprob[, limit])get samplings with good chi square
get_par([filt, quant, parname])get bestfit and quantiles of a fitted parameter
get_random_samples([limit, plotnsamples])get parameters for the random samplings
lnlikelihood1(theta, f, t, f_err, func, ...)define likelhood for MCMC
lnlikelihood2(theta, f, t, f_err, filters, ...)define likelhood for MCMC, with filters
lnposterior1(theta, f, t, f_err, func, ...)define posterior for MCMC
lnposterior2(theta, f, t, f_err, filters, ...)define posterior for MCMC, with filters
lnprior1(theta, bounds)define prior for MCMC
lnprior2(theta, filters, cl, bounds)define prior for MCMC, with filters
predict([x_pred, step, returnv, quant])re-produce the data with the fitted models
predict_random([limit, plotnsamples, ...])re-produce the data randomly with the fitted models
run(bestv, bounds[, filt])run fitting
run_mcmc(t_data, f_data, f_unc_data, bestv, ...)Initial MCMC fit
run_scipy(func, p0, bounds, x, y, yerr[, ...])run model fitting with scipy packages
save_corner(figpath[, datadir, filts, ...])generate corner plots
set_peak()get peak infos of the fitting
train([opt_routine, fit_mean, nwalkers, ...])Fits data with analytic models.
- __init__(x_data, y_data, yerr_data, filters=None)¶
Methods
__init__(x_data, y_data, yerr_data[, filters])continue_chains(t_data, f_data, f_unc_data, ...)Run MCMC for longer than initial fit
filter_samples(samples, lnprob[, limit])get samplings with good chi square
get_par([filt, quant, parname])get bestfit and quantiles of a fitted parameter
get_random_samples([limit, plotnsamples])get parameters for the random samplings
lnlikelihood1(theta, f, t, f_err, func, ...)define likelhood for MCMC
lnlikelihood2(theta, f, t, f_err, filters, ...)define likelhood for MCMC, with filters
lnposterior1(theta, f, t, f_err, func, ...)define posterior for MCMC
lnposterior2(theta, f, t, f_err, filters, ...)define posterior for MCMC, with filters
lnprior1(theta, bounds)define prior for MCMC
lnprior2(theta, filters, cl, bounds)define prior for MCMC, with filters
predict([x_pred, step, returnv, quant])re-produce the data with the fitted models
predict_random([limit, plotnsamples, ...])re-produce the data randomly with the fitted models
run(bestv, bounds[, filt])run fitting
run_mcmc(t_data, f_data, f_unc_data, bestv, ...)Initial MCMC fit
run_scipy(func, p0, bounds, x, y, yerr[, ...])run model fitting with scipy packages
save_corner(figpath[, datadir, filts, ...])generate corner plots
set_peak()get peak infos of the fitting
train([opt_routine, fit_mean, nwalkers, ...])Fits data with analytic models.