Commit 95af0913 authored by Javier's avatar Javier

constants added, linear int/extrapolation added, linalg added

parent 8581f735
using ADerrors
#PDG
const hc = 197.3269804 #MeV fm
const M_values = [1869.65, 2010.26, 1968.34, 2112.2] #MD, MD*, MDs, MDs* (MeV)
const M_error = [0.05, 0.05, 0.07, 0.4]
#1802.05243
const b_values = [3.40, 3.46, 3.55, 3.70, 3.85]
const ZM_data = [1.9684, 1.9935, 2.0253, 2.0630, 2.0814]
const ZM_error = [35, 27, 33, 38, 45] .* 1e-4
const ZM_tm_data = [2.6047, 2.6181, 2.6312, 2.6339, 2.6127]
const ZM_tm_error = [42, 33, 42, 48, 55] .* 1e-4
#1608.08900
const b_values2 = [3.40, 3.46, 3.55, 3.70]
const t0_data = [2.86, 3.659, 5.164, 8.595]
const t0_error = [11, 16, 18, 29] .* 1e-3
const t0_ph_value = [0.413]
const t0_ph_error = ones(1,1) .* 5e-3
#Cov matrices
const C1 = zeros(5, 5)
const C2 = zeros(5, 5)
const C3 = zeros(4, 4)
const C4 = zeros(4, 4)
for i = 1:5
C1[i, i] = ZM_error[i] ^ 2
C2[i, i] = ZM_tm_error[i] ^ 2
if i <= 4
C3[i, i] = t0_error[i] ^ 2
C4[i, i] = M_error[i] ^ 2
end
end
const ZM = cobs(ZM_data, C1, "ZM values")
const ZM_tm = cobs(ZM_tm_data, C2, "ZM_tm values")
const t0_ = cobs(t0_data, C3, "t0")
const t0_ph = cobs(t0_ph_value, t0_ph_error .^ 2, "sqrt(8 t0) (fm)")
const a_ = t0_ph ./ sqrt.(8 .* t0_)
const M = cobs(M_values, C4, "charmed meson masses")
zm(beta::Float64) = ZM[b_values .== beta]
zm_tm(beta::Float64) = ZM_tm[b_values .== beta]
t0(beta::Float64) = t0_[b_values2 .== beta]
a(beta::Float64) = a_[b_values2 .== beta]
......@@ -2,12 +2,13 @@ module juobs
using ADerrors, PyPlot, Statistics, LaTeXStrings
include("juobs_types.jl")
include("juobs_linalg.jl")
include("juobs_reader.jl")
include("juobs_tools.jl")
include("juobs_obs.jl")
export read_mesons, read_ms1
export apply_rw, corr_obs, plat_av, lin_fit
export apply_rw, corr_obs, plat_av, lin_fit, x_lin_fit, y_lin_fit
export meff, dec_const_pcvc
end # module
This diff is collapsed.
......@@ -88,4 +88,7 @@ function lin_fit(x::Vector{Float64}, y::Vector{uwreal})
return (fitp, csqexp)
end
#TODO: interpolation
\ No newline at end of file
x_lin_fit(par::Vector{uwreal}, y::Union{uwreal, Float64}) = (y - par[1]) / par[2]
y_lin_fit(par::Vector{uwreal}, x::Union{uwreal, Float64}) = par[1] + par[2] * x
#TODO: add combined fits
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