Add code for 1D detector #69

Merged
usov_i merged 118 commits from det1d into master 2020-10-22 12:07:50 +02:00
13 changed files with 1843 additions and 8 deletions
Showing only changes of commit 6886279884 - Show all commits

View File

@ -157,7 +157,7 @@ def fitccl(
),
)
# the weighted fit
result = mod.fit(y, params, weights=[1/y_err[i] for i in range(len(y_err))], x=x, calc_covar=True)
result = mod.fit(y, params, weights=[np.abs(1/y_err[i]) for i in range(len(y_err))], x=x, calc_covar=True)
# u.ufloat to work with uncertanities
fit_area = u.ufloat(result.params["g_amp"].value, result.params["g_amp"].stderr)
comps = result.eval_components()