Commit 41431003 authored by Alessandro 's avatar Alessandro

Class Corr extended with extra arguments \theta1 and \theta2 inherited from...

Class Corr extended with extra arguments \theta1 and \theta2 inherited  from CHeader. Required for 3-pt analysis with momentum injection
parent d8d8010b
...@@ -145,13 +145,17 @@ mutable struct Corr ...@@ -145,13 +145,17 @@ mutable struct Corr
mu::Vector{Float64} mu::Vector{Float64}
gamma::Vector{String} gamma::Vector{String}
y0::Int64 y0::Int64
theta1::Vector{Float64}
theta2::Vector{Float64}
function Corr(a::Vector{uwreal}, b::CData) function Corr(a::Vector{uwreal}, b::CData)
h = getfield(b, :header) h = getfield(b, :header)
kappa = [h.k1, h.k2] kappa = [h.k1, h.k2]
mu = [h.mu1, h.mu2] mu = [h.mu1, h.mu2]
gamma = [gamma_name[h.type1+1], gamma_name[h.type2+1]] gamma = [gamma_name[h.type1+1], gamma_name[h.type2+1]]
y0 = Int64(h.x0) y0 = Int64(h.x0)
return new(a, kappa, mu, gamma, y0) theta1 = h.theta1
theta2 = h.theta2
return new(a, kappa, mu, gamma, y0, theta1, theta2)
end end
function Corr(a::Vector{uwreal}, b::Vector{CData}) function Corr(a::Vector{uwreal}, b::Vector{CData})
sym = [:k1, :k2, :mu1, :mu2, :type1, :type2, :x0] sym = [:k1, :k2, :mu1, :mu2, :type1, :type2, :x0]
...@@ -165,7 +169,9 @@ mutable struct Corr ...@@ -165,7 +169,9 @@ mutable struct Corr
mu = [h[1].mu1, h[1].mu2] mu = [h[1].mu1, h[1].mu2]
gamma = [gamma_name[h[1].type1+1], gamma_name[h[1].type2+1]] gamma = [gamma_name[h[1].type1+1], gamma_name[h[1].type2+1]]
y0 = Int64(h[1].x0) y0 = Int64(h[1].x0)
return new(a, kappa, mu, gamma, y0) theta1 = h[1].theta1
theta2 = h[1].theta2
return new(a, kappa, mu, gamma, y0, theta1, theta2)
end end
Corr(o::Vector{uwreal}, k::Vector{Float64}, m::Vector{Float64}, g::Vector{String}, y::Int64) = new(o, k, m, g, y) Corr(o::Vector{uwreal}, k::Vector{Float64}, m::Vector{Float64}, g::Vector{String}, y::Int64) = new(o, k, m, g, y)
end end
......
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