Commit c53fb918 authored by Alessandro 's avatar Alessandro

minor modifications to some constant values

parent 20ec1516
......@@ -17,10 +17,11 @@ const ZV_err = [74, 89, 46, 48, 49] .* 1e-5
#2005.01352
const ZS_over_ZP_data = [1.3497, 1.2914, 1.2317, 1.1709, 1.1343]
const ZS_over_ZP_err = [83, 64, 48, 23, 25 ] .* 1e-4
#1608.08900
#2101.02694
# const b_values2 = [3.40, 3.46, 3.55, 3.70]
const t0_data = [2.86, 3.659, 5.164, 8.595, 14.040]
const t0_error = [11, 16, 18, 29, 49] .* 1e-3
const t0_data = [2.846, 3.634, 5.140, 8.564, 14.064]
const t0_error = [8, 13, 21, 24, 63] .* 1e-3
# from AS analysis
const t0_ph_value = [0.4118]
const t0_ph_error = ones(1,1) .* 25e-4
#2101.10969
......@@ -38,6 +39,10 @@ z = cobs([0.348629, 0.020921, 0.070613], C, "z")
ZP(b) = z[1] + z[2] * (b - 3.79) + z[3] * (b - 3.79)^2
Mrat = uwreal([.9148, 0.0088], "M/mhad")
zm_tm_covar(b) = Mrat / ZP(b)
# same for zm wilson
CC = [[0.164635e-4, 0.215658e-4, -0.754203e-4] [0.215658e-4, 0.121072e-2, 0.308890e-2] [-0.754203e-4, 0.308890e-2, 0.953843e-2]]
zz = cobs([2.270073, 0.121644, -0.464575], CC, "zm")
z_covar(b) = value(Mrat) * (zz[1] + zz[2]*(b-3.79) + zz[3]*(b-3.79)^2)
## taking into account correlations in r_m
#Crm = [[3.699760, -2.198586, -1.476913e-3] [-2.198586, 1.306512, 8.776569e-4] [-1.476913e-3, 8.776569e-4, 5.895710e-7] ]
......
......@@ -853,7 +853,9 @@ function Base.getindex(uw::uwreal, ii::Int64)
idx = getindex(value(uw), ii)
return uw # uwreal([getindex(value(uw), kwargs...), err(uw)], " ")
end
function Base.abs2(uw::uwreal)
return (uw^2)^0.5
end
"""
Base.:*(x::uwreal, y::Matrix{uwreal})
......
......@@ -1266,7 +1266,7 @@ function fit_routine(model::Function, xdata::Array{uwreal}, ydata::Array{uwreal}
println("Chisq / chiexp: ", min_fun_cov(sol.minimizer), " / ", chi2_exp, " (dof: ", length(ydata) - param,")")
chis2_corrected = (length(ydata) - param) * min_fun_cov(sol.minimizer) / chi2_exp
println("Chisq corrected: ", chis2_corrected)
return upar, min_fun_cov(sol.minimizer) / chi2_exp
return upar, min_fun_cov(sol.minimizer) / chi2_exp, chi2_exp
else
chisq_full(p, d) = get_chi2(model, d, ddat, p, Nalpha)
......@@ -1277,7 +1277,7 @@ function fit_routine(model::Function, xdata::Array{uwreal}, ydata::Array{uwreal}
println("Chisq / chiexp: ", min_fun(sol.minimizer), " / ", chi2_exp, " (dof: ", length(ydata) - param,")")
chis2_corrected = (length(ydata) - param) * min_fun(sol.minimizer) / chi2_exp
println("Chisq corrected: ", chis2_corrected)
return upar, min_fun(sol.minimizer) / chi2_exp
return upar, min_fun(sol.minimizer) / chi2_exp, chi2_exp
end
#### chisq_full, min_fun out of conditional ->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment